- Timestamp:
- Dec 2, 2009, 2:24:41 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/0.7-stable/test/config_test.cc
r847 r925 21 21 */ 22 22 23 #include "Suite.h" 24 23 25 #include "Configuration.h" 24 26 25 27 namespace theplu{ 26 28 namespace svndigest{ 27 bool test_codon(void);29 void test_codon(test::Suite&); 28 30 }} // end of namespace svndigest and theplu 29 31 … … 32 34 { 33 35 using namespace theplu::svndigest; 34 bool ok=true;36 test::Suite suite(argc, argv, false); 35 37 36 ok &= test_codon();38 test_codon(suite); 37 39 38 if (ok) 40 if (suite.ok()) { 41 suite.out() << "Test is Ok!" << std::endl; 39 42 return 0; 40 return 1; 43 } 44 suite.out() << "Test failed." << std::endl; 45 return 1; 41 46 } 42 47 … … 45 50 namespace svndigest{ 46 51 47 bool test_codon(void)52 void test_codon(test::Suite& suite) 48 53 { 49 54 const Configuration& c(Configuration::instance()); 50 bool ok =true;51 55 if (!c.codon("foo.h")){ 52 s td::cerr<< "No codon for foo.h\n";53 ok = false;56 suite.out() << "No codon for foo.h\n"; 57 suite.add(false); 54 58 } 55 59 if (!c.codon("../dir/test.cc")){ 56 s td::cerr<< "No codon for test.cc\n";57 ok = false;60 suite.out() << "No codon for test.cc\n"; 61 suite.add(false); 58 62 } 59 60 return ok; 63 if (!c.codon("bootstrap")){ 64 suite.out() << "No codon for bootstrap\n"; 65 suite.add(false); 66 } 61 67 } 62 68
Note: See TracChangeset
for help on using the changeset viewer.