Changeset f323dd1 in git for libpolys/tests/common.h
- Timestamp:
- Feb 29, 2012, 5:18:58 PM (12 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- 8d8cd944663cf80b3fd163a42279526ce163a5fd
- Parents:
- d8b0f69f9828897dca663d5bb516369b1b0ac64a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libpolys/tests/common.h
rd8b0f69 rf323dd1 18 18 19 19 #include <reporter/reporter.h> 20 #include < resources/feResource.h>20 #include <findexec/feResource.h> 21 21 22 22 #ifndef PLURAL_INTERNAL_DECLARATIONS 23 #define PLURAL_INTERNAL_DECLARATIONS 23 #define PLURAL_INTERNAL_DECLARATIONS 24 24 #endif 25 25 … … 57 57 CASE(n_Z2m); 58 58 CASE(n_CF); 59 default: return o << "Unknown type: [" << (const unsigned long) type << "]"; 60 } 59 default: return o << "Unknown type: [" << (const unsigned long) type << "]"; 60 } 61 61 #undef CASE 62 62 return o; … … 76 76 { 77 77 n_Test(a,r); 78 StringSetS(""); 78 StringSetS(""); 79 79 n_Write(a, r); 80 80 … … 83 83 std::stringstream ss; ss << s; 84 84 85 StringSetS(""); 85 StringSetS(""); 86 86 return ss.str(); 87 87 … … 92 92 std::clog << _2S(a, r) << ", of size: " << n_Size(a, r); 93 93 94 if( eoln ) 95 std::clog << std::endl; 94 if( eoln ) 95 std::clog << std::endl; 96 96 } 97 97 … … 106 106 public: 107 107 GlobalPrintingFixture(bool redirect = false): _redirect(redirect){} 108 108 109 109 ~GlobalPrintingFixture() 110 110 { … … 112 112 _ofs.close(); 113 113 } 114 114 115 115 void Redirect() 116 116 { … … 120 120 s = strncpy(s, argv0, ll); 121 121 strncpy(s + ll, ".log", 4); 122 _ofs.open(s); // , ios_base::out) 122 _ofs.open(s); // , ios_base::out) 123 123 omFreeSize((ADDRESS)s, l); 124 124 … … 126 126 } 127 127 128 virtual bool setUpWorld() 128 virtual bool setUpWorld() 129 129 { 130 130 if( _redirect ) … … 137 137 feStringAppendResources(0); 138 138 PrintS(StringAppendS("\n")); 139 139 140 140 return true; 141 141 } 142 142 143 virtual bool tearDownWorld() 143 virtual bool tearDownWorld() 144 144 { 145 std::clog << std::endl << std::endl <<( "</world>" ) << std::endl << std::endl ; 146 return true; 145 std::clog << std::endl << std::endl <<( "</world>" ) << std::endl << std::endl ; 146 return true; 147 147 } 148 148 virtual bool setUp() { std::clog << std::endl << std::endl <<( "<test>" ) << std::endl << std::endl; return true; }
Note: See TracChangeset
for help on using the changeset viewer.