blob: 195570ccfb310c8832b17058908228b8c40e3f1b (
plain)
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
46
47
48
49
|
#include <string>
#if !defined (STLPORT) || !defined (_STLP_USE_NO_IOSTREAMS)
# include <strstream>
# include <limits>
# include "cppunit/cppunit_proxy.h"
# if !defined (STLPORT) || defined(_STLP_USE_NAMESPACES)
using namespace std;
# endif
//
// TestCase class
//
class StrstreamTest : public CPPUNIT_NS::TestCase
{
CPPUNIT_TEST_SUITE(StrstreamTest);
CPPUNIT_TEST(input);
CPPUNIT_TEST_SUITE_END();
private:
void input();
};
CPPUNIT_TEST_SUITE_REGISTRATION(StrstreamTest);
//
// tests implementation
//
void StrstreamTest::input()
{
# if defined (STLPORT) && defined (_STLP_LONG_LONG)
{
istrstream is("652208307");
_STLP_LONG_LONG rval = 0;
is >> rval;
CPPUNIT_ASSERT( rval == 652208307 );
}
{
istrstream is("-652208307");
_STLP_LONG_LONG rval = 0;
is >> rval;
CPPUNIT_ASSERT( rval == -652208307 );
}
}
# endif
#endif
|