From: Tomek Mrugalski Date: Mon, 19 May 2014 09:35:30 +0000 (+0200) Subject: [3400] Broken test removed. X-Git-Tag: trac3434_base~32^2~6 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3ff28cb705281e6c65ee49acf7e4b81202c17230;p=thirdparty%2Fkea.git [3400] Broken test removed. --- diff --git a/src/lib/cc/tests/data_unittests.cc b/src/lib/cc/tests/data_unittests.cc index b555813f26..3d3cd3b747 100644 --- a/src/lib/cc/tests/data_unittests.cc +++ b/src/lib/cc/tests/data_unittests.cc @@ -993,40 +993,6 @@ TEST(Element, preprocessor) { EXPECT_THROW(Element::fromJSON(dbl_tail_comment), JSONError); } -// This test checks whether positions are stored properly is possible to ignore comments. It also checks -// that the comments are ignored only when told to. -TEST(Element, preprocessorLocation) { - - string commented = "# this is a comment, ignore me\n" - "{ \"a\": 1,\n" - "# this is a comment, ignore me\n" - " \"b\": 2}\n" - "# this is a comment, ignore me\n"; - - // This is what we expect in all cases. - ElementPtr exp = Element::fromJSON(commented); - - // Let's convert them all and see that the result it the same every time - ElementPtr a = cfg->get("a"); - ElementPtr b = cfg->get("b"); - EXPECT_RQ( - EXPECT_TRUE(exp->equals(*Element::fromJSON(head_comment, true))); - EXPECT_TRUE(exp->equals(*Element::fromJSON(mid_comment, true))); - EXPECT_TRUE(exp->equals(*Element::fromJSON(tail_comment, true))); - EXPECT_TRUE(exp->equals(*Element::fromJSON(dbl_head_comment, true))); - EXPECT_TRUE(exp->equals(*Element::fromJSON(dbl_mid_comment, true))); - EXPECT_TRUE(exp->equals(*Element::fromJSON(dbl_tail_comment, true))); - - // With preprocessing disabled, it should fail all around - EXPECT_THROW(Element::fromJSON(head_comment), JSONError); - EXPECT_THROW(Element::fromJSON(mid_comment), JSONError); - EXPECT_THROW(Element::fromJSON(tail_comment), JSONError); - EXPECT_THROW(Element::fromJSON(dbl_head_comment), JSONError); - EXPECT_THROW(Element::fromJSON(dbl_mid_comment), JSONError); - EXPECT_THROW(Element::fromJSON(dbl_tail_comment), JSONError); -} - - TEST(Element, getPosition) { std::istringstream ss("{\n" " \"a\": 2,\n" @@ -1121,7 +1087,6 @@ TEST(Element, getPosition) { } - // Tests whether position is returned properly for a commented input JSON text. TEST(Element, getPositionCommented) { std::istringstream ss("{\n"