NS/releases/valve/source/stlport/test/regression/c_test.cpp
puzl f44f16d59a made a copy
git-svn-id: https://unknownworlds.svn.cloudforge.com/ns1@168 67975925-1194-0748-b3d5-c16f83f1a3a1
2005-06-08 18:52:38 +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
}