]> granicus.if.org Git - icinga2/blobdiff - test/base-netstring.cpp
Merge pull request #6544 from gunnarbeutner/fix/deprecated-strstream-header
[icinga2] / test / base-netstring.cpp
index 1f0f4c089df4bd5b42f48b6633b5b845899f684e..8e477fcc03542f7735776f1955b25a35d3739ac3 100644 (file)
@@ -1,6 +1,6 @@
 /******************************************************************************
  * Icinga 2                                                                   *
- * Copyright (C) 2012-2015 Icinga Development Team (http://www.icinga.org)    *
+ * Copyright (C) 2012-2018 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                *
@@ -19,7 +19,7 @@
 
 #include "base/netstring.hpp"
 #include "base/fifo.hpp"
-#include <boost/test/unit_test.hpp>
+#include <BoostTestTargetConfig.h>
 
 using namespace icinga;
 
@@ -33,7 +33,7 @@ BOOST_AUTO_TEST_CASE(netstring)
 
        String s;
        StreamReadContext src;
-       BOOST_CHECK(NetString::ReadStringFromStream(fifo, &s, src));
+       BOOST_CHECK(NetString::ReadStringFromStream(fifo, &s, src) == StatusNewItem);
        BOOST_CHECK(s == "hello");
 
        fifo->Close();