Commit 3ff28cb7 authored by Tomek Mrugalski's avatar Tomek Mrugalski 🛰

[3400] Broken test removed.

parent f5098c01
......@@ -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_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"
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment