Changeset 3e6b93 for src/Parameters/unittests/ContinuousValueTest.cpp
- Timestamp:
- Feb 4, 2015, 9:56:43 PM (11 years ago)
- Parents:
- 76a109
- git-author:
- Frederik Heber <heber@…> (09/23/14 16:34:50)
- git-committer:
- Frederik Heber <heber@…> (02/04/15 21:56:43)
- File:
-
- 1 edited
-
src/Parameters/unittests/ContinuousValueTest.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Parameters/unittests/ContinuousValueTest.cpp
r76a109 r3e6b93 155 155 { 156 156 Value<int> test(*ValidIntRange); 157 test.setAsString(toString(5)); 158 CPPUNIT_ASSERT_THROW(test.getAsString(), ParameterValueException); 159 test.setAsString(toString(0)); 160 std::cout << "The following Assert failures are intended and do not indicate a failure of the test." << std::endl; 161 CPPUNIT_ASSERT_THROW(test.getAsString(), ParameterValueException); 157 std::cout << "The following Assert failures are intended and do not indicate a failure of the test." << std::endl; 158 CPPUNIT_ASSERT_THROW(test.setAsString(toString(5)), ParameterValueException); 159 std::cout << "The following Assert failures are intended and do not indicate a failure of the test." << std::endl; 160 CPPUNIT_ASSERT_THROW(test.setAsString(toString(0)), ParameterValueException); 162 161 } 163 162 … … 187 186 188 187 // setting invalid and getting it, throws ParameterValueException 189 test.set(5); 190 std::cout << "The following Assert failures are intended and do not indicate a failure of the test." << std::endl; 191 CPPUNIT_ASSERT_THROW(test.get(), ParameterValueException); 192 test.set(0); 193 std::cout << "The following Assert failures are intended and do not indicate a failure of the test." << std::endl; 194 CPPUNIT_ASSERT_THROW(test.get(), ParameterValueException); 188 std::cout << "The following Assert failures are intended and do not indicate a failure of the test." << std::endl; 189 CPPUNIT_ASSERT_THROW(test.set(5), ParameterValueException); 190 std::cout << "The following Assert failures are intended and do not indicate a failure of the test." << std::endl; 191 CPPUNIT_ASSERT_THROW(test.set(0), ParameterValueException); 195 192 196 193 // checking all valid ones … … 400 397 { 401 398 Value<Vector> test(*ValidVectorRange); 402 test.set(Vector(5,0,0)); 403 std::cout << "The following Assert failures are intended and do not indicate a failure of the test." << std::endl; 404 CPPUNIT_ASSERT_THROW(test.get(), ParameterValueException); 405 test.set(Vector(5,20,5)); 406 std::cout << "The following Assert failures are intended and do not indicate a failure of the test." << std::endl; 407 CPPUNIT_ASSERT_THROW(test.get(), ParameterValueException); 399 std::cout << "The following Assert failures are intended and do not indicate a failure of the test." << std::endl; 400 CPPUNIT_ASSERT_THROW(test.set(Vector(5,0,0)), ParameterValueException); 401 std::cout << "The following Assert failures are intended and do not indicate a failure of the test." << std::endl; 402 CPPUNIT_ASSERT_THROW(test.set(Vector(5,20,5)), ParameterValueException); 408 403 } 409 404
Note:
See TracChangeset
for help on using the changeset viewer.
