Skip to content

Commit

Permalink
[wip] re #373: add repro
Browse files Browse the repository at this point in the history
  • Loading branch information
biojppm committed May 19, 2023
1 parent 6a5a07f commit d479ac2
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bm/bm_common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
# pragma clang diagnostic ignored "-Wshadow"
# pragma clang diagnostic ignored "-Wsign-conversion"
# pragma clang diagnostic ignored "-Wconversion"
# pragma clang diagnostic ignored "-Wold-style-cast"
# if __clang_major__ >= 8
# pragma clang diagnostic ignored "-Wimplicit-int-conversion"
# endif
Expand All @@ -45,6 +46,7 @@
# pragma GCC diagnostic ignored "-Wuseless-cast"
# pragma GCC diagnostic ignored "-Wconversion"
# pragma GCC diagnostic ignored "-Wsign-conversion"
# pragma GCC diagnostic ignored "-Wold-style-cast"
# if __GNUC__ >= 8
# pragma GCC diagnostic ignored "-Wclass-memaccess" // rapidjson/document.h:1952:24
# endif
Expand Down
16 changes: 16 additions & 0 deletions test/test_simple_map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,22 @@
namespace c4 {
namespace yml {

TEST(simple_map, issue373)
{
Tree tree = parse_in_arena(R"(m:
"": ""
n:
"": "a"
)");
std::cout << tree;
ASSERT_EQ(tree["m"].num_children(), 1u);
EXPECT_EQ(tree["m"][0].key(), "");
EXPECT_EQ(tree["m"][0].val(), "");
ASSERT_EQ(tree["n"].num_children(), 1u);
EXPECT_EQ(tree["n"][0].key(), "");
EXPECT_EQ(tree["n"][0].val(), "a");
}

TEST(simple_map, issue274)
{
Tree tree = parse_in_arena(R"(
Expand Down

0 comments on commit d479ac2

Please sign in to comment.