From e246170374af9f3f879fa6d50b6e1037a44d0ca2 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Thu, 7 Nov 2013 18:21:55 +0100 Subject: [PATCH] Fix unit test name. Refs #2710 --- test/CMakeLists.txt | 3 +-- test/icinga-perfdata.cpp | 10 +++++----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index a166ea369..0d2088a28 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -68,8 +68,7 @@ add_boost_test(base icinga_perfdata/simple icinga_perfdata/multiple icinga_perfdata/uom - icinga_perfdata/warncrit - icinga_perfdata/minmax + icinga_perfdata/warncritminmax icinga_perfdata/invalid ) diff --git a/test/icinga-perfdata.cpp b/test/icinga-perfdata.cpp index be39783c4..bac094e0a 100644 --- a/test/icinga-perfdata.cpp +++ b/test/icinga-perfdata.cpp @@ -62,9 +62,9 @@ BOOST_AUTO_TEST_CASE(uom) BOOST_CHECK(str == "test=123456b"); } -BOOST_AUTO_TEST_CASE(warncrit) +BOOST_AUTO_TEST_CASE(warncritminmax) { - Dictionary::Ptr pd = PluginUtility::ParsePerfdata("test=123456b;1000;2000"); + Dictionary::Ptr pd = PluginUtility::ParsePerfdata("test=123456b;1000;2000;3000;4000"); PerfdataValue::Ptr pv = pd->Get("test"); BOOST_CHECK(pv); @@ -74,11 +74,11 @@ BOOST_AUTO_TEST_CASE(warncrit) BOOST_CHECK(pv->GetUnit() == "bytes"); BOOST_CHECK(pv->GetWarn() == 1000); BOOST_CHECK(pv->GetCrit() == 2000); - BOOST_CHECK(pv->GetMin() == Empty); - BOOST_CHECK(pv->GetMax() == Empty); + BOOST_CHECK(pv->GetMin() == 3000); + BOOST_CHECK(pv->GetMax() == 4000); String str = PluginUtility::FormatPerfdata(pd); - BOOST_CHECK(str == "test=123456b;1000;2000"); + BOOST_CHECK(str == "test=123456b;1000;2000;3000;4000"); } BOOST_AUTO_TEST_CASE(invalid)