Fixed several unit tests
This commit is contained in:
parent
8c81a1decb
commit
c313cee085
3 changed files with 29 additions and 23 deletions
|
|
@ -460,10 +460,14 @@ BOOST_AUTO_TEST_CASE(testCommodityComparisons)
|
||||||
BOOST_CHECK(x3 <= x5);
|
BOOST_CHECK(x3 <= x5);
|
||||||
BOOST_CHECK(x3 < x5);
|
BOOST_CHECK(x3 < x5);
|
||||||
BOOST_CHECK(x3 <= x5);
|
BOOST_CHECK(x3 <= x5);
|
||||||
|
#ifndef NOT_FOR_PYTHON
|
||||||
BOOST_CHECK(! (x3 == x5));
|
BOOST_CHECK(! (x3 == x5));
|
||||||
|
#endif
|
||||||
BOOST_CHECK(x3 < x1);
|
BOOST_CHECK(x3 < x1);
|
||||||
BOOST_CHECK(x3 < x4);
|
BOOST_CHECK(x3 < x4);
|
||||||
|
#ifndef NOT_FOR_PYTHON
|
||||||
BOOST_CHECK(! (x6 == x7));
|
BOOST_CHECK(! (x6 == x7));
|
||||||
|
#endif
|
||||||
BOOST_CHECK_THROW(x6 < x7, amount_error);
|
BOOST_CHECK_THROW(x6 < x7, amount_error);
|
||||||
|
|
||||||
BOOST_CHECK(x1.valid());
|
BOOST_CHECK(x1.valid());
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,9 @@ BOOST_AUTO_TEST_CASE(testPriceHistory)
|
||||||
amount_t x1("100.10 AAPL");
|
amount_t x1("100.10 AAPL");
|
||||||
|
|
||||||
BOOST_CHECK_THROW(x0.value(), amount_error);
|
BOOST_CHECK_THROW(x0.value(), amount_error);
|
||||||
|
#ifndef NOT_FOR_PYTHON
|
||||||
BOOST_CHECK(! x1.value());
|
BOOST_CHECK(! x1.value());
|
||||||
|
#endif
|
||||||
|
|
||||||
// Commodities cannot be constructed by themselves, since a great deal
|
// Commodities cannot be constructed by themselves, since a great deal
|
||||||
// of their state depends on how they were seen to be used.
|
// of their state depends on how they were seen to be used.
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue