Ignore:
Timestamp:
Feb 4, 2015, 9:56:43 PM (11 years ago)
Author:
Frederik Heber <heber@…>
Parents:
76a109
git-author:
Frederik Heber <heber@…> (09/23/14 16:34:50)
git-committer:
Frederik Heber <heber@…> (02/04/15 21:56:43)
Message:

Changed checking of Parameter::isValid() on set(), not on get().

  • this would fix problems with ActionQueue::OutputAs...() commands that need to get() parameter values after usage by the Action. If files were forced to be non-present before, then written by the Action, the Validator will then fail.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parameters/unittests/DiscreteValueTest.cpp

    r76a109 r3e6b93  
    175175
    176176  // setting invalid and getting it, throws
    177   test.set(4);
    178   std::cout << "The following Assert failures are intended and do not indicate a failure of the test." << std::endl;
    179   CPPUNIT_ASSERT_THROW(test.get(), ParameterValueException);
    180   test.set(0);
    181   std::cout << "The following Assert failures are intended and do not indicate a failure of the test." << std::endl;
    182   CPPUNIT_ASSERT_THROW(test.get(), ParameterValueException);
     177  std::cout << "The following Assert failures are intended and do not indicate a failure of the test." << std::endl;
     178  CPPUNIT_ASSERT_THROW(test.set(4), ParameterValueException);
     179  std::cout << "The following Assert failures are intended and do not indicate a failure of the test." << std::endl;
     180  CPPUNIT_ASSERT_THROW(test.set(0), ParameterValueException);
    183181
    184182  // checking all valid ones
     
    203201
    204202  // setting invalid and getting it, throws
    205   test.setAsString(toString(4));
    206   std::cout << "The following Assert failures are intended and do not indicate a failure of the test." << std::endl;
    207   CPPUNIT_ASSERT_THROW(test.getAsString(), ParameterValueException);
    208   test.setAsString(toString(0));
    209   std::cout << "The following Assert failures are intended and do not indicate a failure of the test." << std::endl;
    210   CPPUNIT_ASSERT_THROW(test.getAsString(), ParameterValueException);
     203  std::cout << "The following Assert failures are intended and do not indicate a failure of the test." << std::endl;
     204  CPPUNIT_ASSERT_THROW(test.setAsString(toString(4)), ParameterValueException);
     205  std::cout << "The following Assert failures are intended and do not indicate a failure of the test." << std::endl;
     206  CPPUNIT_ASSERT_THROW(test.setAsString(toString(0)), ParameterValueException);
    211207
    212208  // checking all valid ones
Note: See TracChangeset for help on using the changeset viewer.