- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/unittests/Box_BoundaryConditionsUnitTest.cpp
rdd067a r97f9b9 102 102 std::stringstream outstream; 103 103 outstream << *bc; 104 CPPUNIT_ASSERT( outstream.str() == std::string("Wrap , Wrap,Wrap"));104 CPPUNIT_ASSERT( outstream.str() == std::string("Wrap Wrap Wrap")); 105 105 } 106 106 … … 132 132 { 133 133 // 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"); 136 137 137 138 // 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 ); 138 152 CPPUNIT_ASSERT_EQUAL( BoundaryConditions::Bounce, bc->get(0) ); 139 153 CPPUNIT_ASSERT_EQUAL( BoundaryConditions::Wrap, bc->get(1) );
Note:
See TracChangeset
for help on using the changeset viewer.