Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/unittests/Box_BoundaryConditionsUnitTest.cpp

    rdd067a r97f9b9  
    102102  std::stringstream outstream;
    103103  outstream << *bc;
    104   CPPUNIT_ASSERT( outstream.str() == std::string("Wrap, Wrap, Wrap"));
     104  CPPUNIT_ASSERT( outstream.str() == std::string("Wrap Wrap Wrap"));
    105105}
    106106
     
    132132{
    133133  // set by string
    134   std::stringstream inputstream(" Bounce, Wrap, Ignore");
    135   CPPUNIT_ASSERT_NO_THROW( inputstream >> *bc );
     134  std::stringstream inputstream(" Bounce,Wrap,Ignore");
     135  std::stringstream otherinputstream(" Bounce Wrap Ignore");
     136  std::stringstream anotherinputstream(" Bounce, Wrap, Ignore");
    136137
    137138  // check
     139  CPPUNIT_ASSERT_NO_THROW( inputstream >> *bc );
     140  CPPUNIT_ASSERT_EQUAL( BoundaryConditions::Bounce, bc->get(0) );
     141  CPPUNIT_ASSERT_EQUAL( BoundaryConditions::Wrap, bc->get(1) );
     142  CPPUNIT_ASSERT_EQUAL( BoundaryConditions::Ignore, bc->get(2) );
     143
     144  // check
     145  CPPUNIT_ASSERT_NO_THROW( otherinputstream >> *bc );
     146  CPPUNIT_ASSERT_EQUAL( BoundaryConditions::Bounce, bc->get(0) );
     147  CPPUNIT_ASSERT_EQUAL( BoundaryConditions::Wrap, bc->get(1) );
     148  CPPUNIT_ASSERT_EQUAL( BoundaryConditions::Ignore, bc->get(2) );
     149
     150  // check
     151  CPPUNIT_ASSERT_NO_THROW( anotherinputstream >> *bc );
    138152  CPPUNIT_ASSERT_EQUAL( BoundaryConditions::Bounce, bc->get(0) );
    139153  CPPUNIT_ASSERT_EQUAL( BoundaryConditions::Wrap, bc->get(1) );
Note: See TracChangeset for help on using the changeset viewer.