>From 79d0911cbe8d6a8d268ee953b6b42490a3ee45a9 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 30 Oct 2014 14:18:39 +0100 Subject: [PATCH 2/2] Operate directly on strings in default input test case. There is no real need to use exact_cast<> here and it prevents "so_test" build from linking as the classes used by exact_cast<> are not exported from the LMI shared library currently, so just use strings directly instead. --- wx_test_default_input.cpp | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/wx_test_default_input.cpp b/wx_test_default_input.cpp index 6074378..3bb2158 100644 --- a/wx_test_default_input.cpp +++ b/wx_test_default_input.cpp @@ -34,16 +34,20 @@ #include +#include + LMI_WX_TEST_CASE(default_input) { calendar_date const today; calendar_date const first_of_month(today.year(), today.month(), 1); Input const& cell = default_cell(); - calendar_date const effective_date = exact_cast(cell["EffectiveDate"])->value(); + calendar_date effective_date; + std::istringstream is(cell["EffectiveDate"].str()); + LMI_ASSERT(is >> effective_date); LMI_ASSERT_EQUAL(effective_date, first_of_month); - std::string const general_account_rate = exact_cast(cell["GeneralAccountRate"])->value(); + std::string const general_account_rate = cell["GeneralAccountRate"].str(); LMI_ASSERT(!general_account_rate.empty()); wxLogMessage("GeneralAccountRate is \"%s\"", general_account_rate.c_str()); } -- 1.7.9