/[dejagnu]/dejagnu/testsuite/libdejagnu/unit.cc
ViewVC logotype

Diff of /dejagnu/testsuite/libdejagnu/unit.cc

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by rsavoye, Fri May 4 05:25:59 2001 UTC revision 1.2 by rsavoye, Sat May 26 05:55:28 2001 UTC
# Line 1  Line 1 
1  // unit.cc -- This is a test case for the Dejagnu.h classes.  // unit.cc -- This is a test case for the Dejagnu.h classes.
2    
3  #include <iostream>  #include <iostream>
 #include <dejagnu.h>  
   
4  #include <regex.h>  #include <regex.h>
5  #include <string>  #include <string>
6  #include <fstream>  #include <fstream>
7  #include <set>  #include <set>
8  #include <sys/types.h>  #include <sys/types.h>
9    #include <dejagnu.h>
10    
11    using namespace std;
12    
13  TestState runtest;  TestState runtest;
14  TestState test;  TestState test;
# Line 48  main (int argc, char *argv[]) { Line 49  main (int argc, char *argv[]) {
49      // Replace the output buffer for cout, so we can examine it to      // Replace the output buffer for cout, so we can examine it to
50      // see what was displayed. Otherwise, there is no way we can test      // see what was displayed. Otherwise, there is no way we can test
51      // the logging functions completely.      // the logging functions completely.
     streambuf *sb =  cout.rdbuf();  
52      char bbuuff[5120];      char bbuuff[5120];
53      sb->setbuf(bbuuff, 5120);  #ifdef HAVE_STL3
54        cout.rdbuf()->pubsetbuf(bbuuff, 5120);
55    #else
56        cout.rdbuf()->setbuf(bbuuff, 5120);
57    #endif
58    
59      testClass1.tname = "testType1";      testClass1.tname = "testType1";
60      testClass1.tnum = 1;        testClass1.tnum = 1;  
# Line 108  main (int argc, char *argv[]) { Line 112  main (int argc, char *argv[]) {
112      } else {      } else {
113          runtest.fail ("Totals message");          runtest.fail ("Totals message");
114      }      }
   
115  }  }
116    
117    

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26