diff --git a/test/Makefile.am b/test/Makefile.am index 305b6e06c..11c288a9d 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -11,14 +11,12 @@ base_dictionary_SOURCES = \ base_dictionary_CPPFLAGS = \ $(BOOST_CPPFLAGS) \ - -I${top_srcdir}/base \ - -I${top_srcdir}/jsonrpc \ - -I${top_srcdir}/icinga \ + -I${top_srcdir}/lib/base \ + -I${top_srcdir}/lib/icinga \ -I${top_srcdir} base_dictionary_LDADD = \ $(BOOST_LDFLAGS) \ $(BOOST_UNIT_TEST_FRAMEWORK_LIB) \ - ${top_builddir}/base/libbase.la \ - ${top_builddir}/jsonrpc/libjsonrpc.la \ - ${top_builddir}/icinga/libicinga.la + ${top_builddir}/lib/base/libbase.la \ + ${top_builddir}/lib/icinga/libicinga.la diff --git a/test/base-dictionary.cpp b/test/base-dictionary.cpp index 0af73d525..d09b74fc8 100644 --- a/test/base-dictionary.cpp +++ b/test/base-dictionary.cpp @@ -17,16 +17,17 @@ BOOST_AUTO_TEST_CASE(getproperty) dictionary->Set("test1", 7); dictionary->Set("test2", "hello world"); - long test1; - BOOST_REQUIRE(dictionary->Get("test1", &test1)); + Value test1; + test1 = dictionary->Get("test1"); BOOST_REQUIRE(test1 == 7); - string test2; - BOOST_REQUIRE(dictionary->Get("test2", &test2)); + Value test2; + test2 = dictionary->Get("test2"); BOOST_REQUIRE(test2 == "hello world"); - long test3; - BOOST_REQUIRE(!dictionary->Get("test3", &test3)); + Value test3; + test3 = dictionary->Get("test3"); + BOOST_REQUIRE(test3.IsEmpty()); } BOOST_AUTO_TEST_CASE(getproperty_dict) @@ -36,12 +37,11 @@ BOOST_AUTO_TEST_CASE(getproperty_dict) dictionary->Set("test1", other); - Dictionary::Ptr test1; - BOOST_REQUIRE(dictionary->Get("test1", &test1)); + Dictionary::Ptr test1 = dictionary->Get("test1"); BOOST_REQUIRE(other == test1); - Dictionary::Ptr test2; - BOOST_REQUIRE(!dictionary->Get("test2", &test2)); + Dictionary::Ptr test2 = dictionary->Get("test2"); + BOOST_REQUIRE(!test2); } BOOST_AUTO_TEST_CASE(unnamed)