/******************************************************************************
* Icinga 2 *
- * Copyright (C) 2012-present 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 *
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
******************************************************************************/
-#include "base/netstring.h"
-#include "base/fifo.h"
-#include <boost/test/unit_test.hpp>
+#include "base/netstring.hpp"
+#include "base/fifo.hpp"
+#include <BoostTestTargetConfig.h>
using namespace icinga;
BOOST_AUTO_TEST_CASE(netstring)
{
- FIFO::Ptr fifo = make_shared<FIFO>();
+ FIFO::Ptr fifo = new FIFO();
NetString::WriteStringToStream(fifo, "hello");
String s;
- BOOST_CHECK(NetString::ReadStringFromStream(fifo, &s));
+ StreamReadContext src;
+ BOOST_CHECK(NetString::ReadStringFromStream(fifo, &s, src) == StatusNewItem);
BOOST_CHECK(s == "hello");
fifo->Close();