Changeset 996 for trunk/test


Ignore:
Timestamp:
Dec 28, 2009, 4:57:06 AM (12 years ago)
Author:
Peter Johansson
Message:

refs #279. Added support for anchor_image format in Configuration class and extended test of Configuration.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/config_test.cc

    r978 r996  
    2828namespace svndigest{
    2929  void test_codon(test::Suite&);
     30  void test_read_write(test::Suite&);
    3031}} // end of namespace svndigest and theplu
    3132
     
    3738
    3839  test_codon(suite);
     40  test_read_write(suite);
    3941                                                                               
    4042  if (suite.ok()) {
     
    6769  }
    6870 
     71  void test_read_write(test::Suite& suite)
     72  {
     73    Configuration& config = Configuration::instance();
     74    std::stringstream ss;
     75    ss << config;
     76    config.load(ss);
     77    std::stringstream ss2;
     78    ss2 << config;
     79    if (ss2.str() != ss.str()) {
     80      suite.out() << "error: configuration output not equal\n";
     81      suite.out() << "defalt output:\n" << ss.str() << "\n";
     82      suite.out() << "second output:\n" << ss2.str() << "\n";
     83      suite.add(false);
     84    }
     85  }
     86
    6987}} // end of namespace svndigest and theplu
Note: See TracChangeset for help on using the changeset viewer.