jsonrpc \
icinga \
components \
- icinga-app
+ icinga-app \
+ test
icinga2docdir = ${prefix}/share/doc/icinga2
icinga2doc_DATA = \
template<class TObject, class TArgs>
function<int (TArgs)> bind_weak(int (TObject::*function)(TArgs), const weak_ptr<TObject>& wref)
{
- return bind(&delegate_fwd<TObject, TArgs>, function, wref, _1);
+ return bind(&delegate_fwd<TObject, TArgs>, function, wref, placeholders::_1);
}
template<class TObject, class TArgs>
EXTRA_DIST=include
-dist-hook:
- mkdir -p boost && \
+include:
+ rm -Rf boost && mkdir -p boost && \
bcp --boost=$(BOOST_PATH)/include tr1 smart_ptr bind function make_shared boost && \
- rm -Rf include && \
- mkdir include && \
- mv boost/boost include/ && \
- rm -Rf boost
+ rm -Rf include && mkdir include && \
+ mv boost/boost include/
+
+clean:
+ rm -Rf include
AX_CXX_GCC_ABI_DEMANGLE
AX_PTHREAD
-<<<<<<< Updated upstream
-LT_INIT([dlopen disable-static])
-=======
LT_INIT([dlopen shared disable-static win32-dll])
->>>>>>> Stashed changes
LT_CONFIG_LTDL_DIR([ltdl])
LTDL_INIT
icinga-app/Makefile
jsonrpc/Makefile
mmatch/Makefile
+test/Makefile
Doxyfile
])
--- /dev/null
+## Process this file with automake to produce Makefile.in
+
+TESTS = \
+ base-dictionary
+
+check_PROGRAMS = \
+ base-dictionary
+
+base_dictionary_SOURCES = \
+ base-dictionary.cpp
+
+base_dictionary_CXXFLAGS = \
+ $(BOOST_CPPFLAGS) \
+ -I${top_srcdir}/base \
+ -I${top_srcdir}
+
+base_dictionary_LDADD = \
+ $(BOOST_LDFLAGS) \
+ $(BOOST_UNIT_TEST_FRAMEWORK_LIB) \
+ ${top_builddir}/base/libbase.la
--- /dev/null
+#define BOOST_TEST_DYN_LINK
+#define BOOST_TEST_MODULE base_dictionary
+#include <boost/test/unit_test.hpp>
+
+#include <i2-base.h>
+using namespace icinga;
+
+BOOST_AUTO_TEST_CASE(construct)
+{
+ Dictionary::Ptr dictionary = make_shared<Dictionary>();
+ BOOST_REQUIRE(dictionary);
+}
+
+BOOST_AUTO_TEST_CASE(setproperty)
+{
+ Dictionary::Ptr dictionary = make_shared<Dictionary>();
+ dictionary->SetProperty("test1", 7);
+ dictionary->SetProperty("test2", "hello world");
+
+ long test1;
+ BOOST_REQUIRE(dictionary->GetProperty("test1", &test1));
+ BOOST_REQUIRE(test1 == 7);
+
+ string test2;
+ BOOST_REQUIRE(dictionary->GetProperty("test2", &test2));
+ BOOST_REQUIRE(test2 == "hello world");
+}