ledger/test/unit/t_value.cc
2014-08-16 19:40:23 +05:30

37 lines
663 B
C++

#define BOOST_TEST_DYN_LINK
#include <boost/test/unit_test.hpp>
#include <system.hh>
#include "value.h"
using namespace ledger;
struct value_fixture {
value_fixture() {
times_initialize();
amount_t::initialize();
value_t::initialize();
// Cause the display precision for dollars to be initialized to 2.
amount_t x1("$1.00");
BOOST_CHECK(x1);
amount_t::stream_fullstrings = true; // make reports from UnitTests accurate
}
~value_fixture()
{
amount_t::stream_fullstrings = false;
amount_t::shutdown();
times_shutdown();
value_t::shutdown();
}
};
BOOST_FIXTURE_TEST_SUITE(value, value_fixture)
BOOST_AUTO_TEST_SUITE_END()