]> granicus.if.org Git - icinga2/blobdiff - test/base-netstring.cpp
Add --units, --rate and --rate-multiplier support for the snmpv3 check command
[icinga2] / test / base-netstring.cpp
index 445e60d2978b6491c302262659364c664af6a4e8..2e4d0adeee2061a425c536a7dc8be5f6f7fce853 100644 (file)
@@ -1,6 +1,6 @@
 /******************************************************************************
  * Icinga 2                                                                   *
- * Copyright (C) 2012-2015 Icinga Development Team (http://www.icinga.org)    *
+ * Copyright (C) 2012-2016 Icinga Development Team (https://www.icinga.org/)  *
  *                                                                            *
  * This program is free software; you can redistribute it and/or              *
  * modify it under the terms of the GNU General Public License                *
@@ -32,7 +32,8 @@ BOOST_AUTO_TEST_CASE(netstring)
        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();