]> granicus.if.org Git - icinga2/blobdiff - test/base-serialize.cpp
Move PerfdataValue() class into base library
[icinga2] / test / base-serialize.cpp
index a871eb38688bf4df73c4b4ca7c9a3eac203fb57f..4311e1f65dacfbc8577e635beb2dbd61f3222e8f 100644 (file)
@@ -1,6 +1,6 @@
 /******************************************************************************
  * Icinga 2                                                                   *
- * Copyright (C) 2012-2013 Icinga Development Team (http://www.icinga.org/)   *
+ * Copyright (C) 2012-2017 Icinga Development Team (https://www.icinga.com/)  *
  *                                                                            *
  * This program is free software; you can redistribute it and/or              *
  * modify it under the terms of the GNU General Public License                *
  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.             *
  ******************************************************************************/
 
-#include "icinga/perfdatavalue.h"
-#include "base/dictionary.h"
-#include "base/objectlock.h"
-#include "base/serializer.h"
-#include "base/array.h"
-#include "base/dictionary.h"
-#include <boost/test/unit_test.hpp>
-#include <boost/foreach.hpp>
+#include "base/perfdatavalue.hpp"
+#include "base/dictionary.hpp"
+#include "base/objectlock.hpp"
+#include "base/serializer.hpp"
+#include "base/array.hpp"
+#include "base/dictionary.hpp"
+#include <BoostTestTargetConfig.h>
 #include <boost/tuple/tuple.hpp>
 
 using namespace icinga;
@@ -41,7 +40,7 @@ BOOST_AUTO_TEST_CASE(scalar)
 
 BOOST_AUTO_TEST_CASE(array)
 {
-       Array::Ptr array = make_shared<Array>();
+       Array::Ptr array = new Array();
        array->Add(7);
        array->Add(7.3);
        array->Add(Empty);
@@ -59,7 +58,7 @@ BOOST_AUTO_TEST_CASE(array)
 
 BOOST_AUTO_TEST_CASE(dictionary)
 {
-       Dictionary::Ptr dict = make_shared<Dictionary>();
+       Dictionary::Ptr dict = new Dictionary();
        dict->Set("k1", 7);
        dict->Set("k2", 7.3);
        dict->Set("k3", Empty);
@@ -77,7 +76,7 @@ BOOST_AUTO_TEST_CASE(dictionary)
 
 BOOST_AUTO_TEST_CASE(object)
 {
-       PerfdataValue::Ptr pdv = make_shared<PerfdataValue>(100, true, "bytes");
+       PerfdataValue::Ptr pdv = new PerfdataValue("size", 100, true, "bytes");
 
        PerfdataValue::Ptr result = Deserialize(Serialize(pdv));