NS/releases/3.02/source/stlport/test/regression/c_test.cpp
tankefugl 7b18f64309 Branched for 3.02 changes
git-svn-id: https://unknownworlds.svn.cloudforge.com/ns1@16 67975925-1194-0748-b3d5-c16f83f1a3a1
2005-03-30 12:54:33 +00:00

59 lines
979 B
C++

#include <string>
#include <iostream>
#include <fstream>
#include <list>
#ifndef STLPORT
//#error You Did not get the STLport include files!
#endif
using namespace std;
main (int argc, char *argv[])
{
#ifdef STLPORT
string s2 = "STLport included";
cout << s2 << endl;
#else
string s2 = "STLport NOT included!";
cout << s2 << endl;
#endif
string s = "hello";
cout << s << endl;
ofstream fstr("testfile");
fstr << s << endl;
list<int> L;
for (int i = 0; i < 10; ++i) {
L.push_back(i);
}
for (list<int>::const_reverse_iterator cri = L.rbegin();
cri != (list<int>::const_reverse_iterator) L.rend(); ++cri) {
cout << *cri << endl;
}
#ifdef STLPORT
string s3 = "PASSED";
if (strstr(argv[0], "nostlport"))
s3 = "FAILED";
cout << s3 << endl;
#else
string s3 = "PASSED";
if (!strstr(argv[0], "nostlport"))
s3 = "FAILED";
cout << s3 << endl;
#endif
}