File: t.utils.h

package info (click to toggle)
mimetic 0.9.3-3
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 2,516 kB
  • ctags: 1,749
  • sloc: cpp: 11,182; sh: 7,902; makefile: 162
file content (45 lines) | stat: -rw-r--r-- 795 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#ifndef _T_UTILS_H_
#define _T_UTILS_H_
#include <iostream>
#include <fstream>
#include <iterator>
#include <iomanip>
#include <string>
#include <sstream>
#include <list>
#include <mimetic/utils.h>
#include "cutee.h"


namespace mimetic
{


struct TEST_CLASS( t_utils )
{
    void TEST_FUNCTION( t_int2str )
    {
        using namespace std;
        for(int i = -123; i < 123; ++i)
        {
            stringstream ss;
            ss << i;
            TEST_ASSERT_EQUALS_P(ss.str(), utils::int2str(i));
        }
    }
    void TEST_FUNCTION( t_int2hex )
    {
        using namespace std;
        for(int i = -123; i < 123; ++i)
        {
            stringstream ss;
            ss << hex << i;
            TEST_ASSERT_EQUALS_P(ss.str(), utils::int2hex(i));
        }
    }
};

};

#endif