diff --git a/src/libexpr/tests/compose-yaml-test-suite.sh b/src/libexpr/tests/compose-yaml-test-suite.sh index b888c35cb29..0f24fde68e3 100755 --- a/src/libexpr/tests/compose-yaml-test-suite.sh +++ b/src/libexpr/tests/compose-yaml-test-suite.sh @@ -20,6 +20,24 @@ for f in "$1"/src/*.yaml; do testname="$(basename ${f} .yaml)" echo "static constexpr std::string_view T_${testname} = R\"RAW(" cat ${f} + case $testname in + 4ABK) + cat << EOL + json: | + { + "unquoted": "separate", + "http://foo.com": null, + "omitted value": null + } +EOL + ;; + SM9W) + # not JSON compatible due to null key + echo " fail: true" + ;; + *) + ;; + esac echo ")RAW\";" echo done @@ -29,15 +47,30 @@ echo echo "namespace nix {" for f in "$1"/src/*.yaml; do testname="$(basename ${f} .yaml)" - [[ "${testname}" = "2SXE" ]] && echo " /** This test case is ignored because the YAML string is parsed incorrectly by ryml, but it's a rather artificial case, which isn't valid YAML 1.3 either." + ignore="false" + skip="false" + case $testname in + H7TQ | MUS6 | ZYU8) + echo " /** This test is ignored because these tests are not required to fail and rapidyaml ignores the YAML version string." + ignore="true" + ;; + 3HFZ | 4EJS | 5TRB | 5U3A | 7LBH | 9C9N | 9MQT | CVW2 | CXX2 | D49Q | DK4H | DK95 | G5U8 | JKF3 | N782 | QB6E | QLJ7 | RXY3 | S4GJ | S98Z | SY6V | VJP3 | X4QW | Y79Y | YJV2 | ZCZ6 | ZL4Z | ZXT5 | 3HFZ | 4EJS | 5TRB | 5U3A | 7LBH | 9C9N | 9MQT | CVW2 | CXX2 | D49Q | DK4H | DK95 | G5U8 | JKF3 | N782 | QB6E | QLJ7 | RXY3 | S4GJ | S98Z | SY6V | VJP3 | X4QW | Y79Y | YJV2 | ZCZ6 | ZL4Z | ZXT5) + skip="true" + ;; + *) + ;; + esac echo " TEST_F(${testclass}, T_${testname}) {" if [ "${testname}" = "565N" ]; then echo " ASSERT_THROW(${testmethod}(T_${testname}),EvalError); // nix has no binary data type" else - echo " ASSERT_EQ(${testmethod}(T_${testname}),\"OK\");" + if [ "${skip}" = "true" ]; then + echo " GTEST_SKIP() << \"Reason: Invalid yaml is parsed successfully\";" + fi + echo " ${testmethod}(T_${testname});" fi echo " }" - [[ "${testname}" = "2SXE" ]] && echo " */" + [[ "${ignore}" = "true" ]] && echo " */" echo done echo "} /* namespace nix */" diff --git a/src/libexpr/tests/yaml-test-suite.hh b/src/libexpr/tests/yaml-test-suite.hh index a9f3047da1f..ee26f6f80c0 100644 --- a/src/libexpr/tests/yaml-test-suite.hh +++ b/src/libexpr/tests/yaml-test-suite.hh @@ -819,6 +819,12 @@ static constexpr std::string_view T_4ABK = R"RAW( unquoted: "separate" http://foo.com: null omitted value: null + json: | + { + "unquoted": "separate", + "http://foo.com": null, + "omitted value": null + } )RAW"; static constexpr std::string_view T_4CQQ = R"RAW( @@ -9924,6 +9930,7 @@ static constexpr std::string_view T_SM9W = R"RAW( json: null dump: | : + fail: true )RAW"; static constexpr std::string_view T_SR86 = R"RAW( @@ -11832,169 +11839,169 @@ static constexpr std::string_view T_ZYU8 = R"RAW( namespace nix { TEST_F(FromYAMLTest, T_229Q) { - ASSERT_EQ(execYAMLTest(T_229Q),"OK"); + execYAMLTest(T_229Q); } TEST_F(FromYAMLTest, T_236B) { - ASSERT_EQ(execYAMLTest(T_236B),"OK"); + execYAMLTest(T_236B); } TEST_F(FromYAMLTest, T_26DV) { - ASSERT_EQ(execYAMLTest(T_26DV),"OK"); + execYAMLTest(T_26DV); } TEST_F(FromYAMLTest, T_27NA) { - ASSERT_EQ(execYAMLTest(T_27NA),"OK"); + execYAMLTest(T_27NA); } TEST_F(FromYAMLTest, T_2AUY) { - ASSERT_EQ(execYAMLTest(T_2AUY),"OK"); + execYAMLTest(T_2AUY); } TEST_F(FromYAMLTest, T_2CMS) { - ASSERT_EQ(execYAMLTest(T_2CMS),"OK"); + execYAMLTest(T_2CMS); } TEST_F(FromYAMLTest, T_2EBW) { - ASSERT_EQ(execYAMLTest(T_2EBW),"OK"); + execYAMLTest(T_2EBW); } TEST_F(FromYAMLTest, T_2G84) { - ASSERT_EQ(execYAMLTest(T_2G84),"OK"); + execYAMLTest(T_2G84); } TEST_F(FromYAMLTest, T_2JQS) { - ASSERT_EQ(execYAMLTest(T_2JQS),"OK"); + execYAMLTest(T_2JQS); } TEST_F(FromYAMLTest, T_2LFX) { - ASSERT_EQ(execYAMLTest(T_2LFX),"OK"); + execYAMLTest(T_2LFX); } - /** This test case is ignored because the YAML string is parsed incorrectly by ryml, but it's a rather artificial case, which isn't valid YAML 1.3 either. TEST_F(FromYAMLTest, T_2SXE) { - ASSERT_EQ(execYAMLTest(T_2SXE),"OK"); + execYAMLTest(T_2SXE); } - */ TEST_F(FromYAMLTest, T_2XXW) { - ASSERT_EQ(execYAMLTest(T_2XXW),"OK"); + execYAMLTest(T_2XXW); } TEST_F(FromYAMLTest, T_33X3) { - ASSERT_EQ(execYAMLTest(T_33X3),"OK"); + execYAMLTest(T_33X3); } TEST_F(FromYAMLTest, T_35KP) { - ASSERT_EQ(execYAMLTest(T_35KP),"OK"); + execYAMLTest(T_35KP); } TEST_F(FromYAMLTest, T_36F6) { - ASSERT_EQ(execYAMLTest(T_36F6),"OK"); + execYAMLTest(T_36F6); } TEST_F(FromYAMLTest, T_3ALJ) { - ASSERT_EQ(execYAMLTest(T_3ALJ),"OK"); + execYAMLTest(T_3ALJ); } TEST_F(FromYAMLTest, T_3GZX) { - ASSERT_EQ(execYAMLTest(T_3GZX),"OK"); + execYAMLTest(T_3GZX); } TEST_F(FromYAMLTest, T_3HFZ) { - ASSERT_EQ(execYAMLTest(T_3HFZ),"OK"); + GTEST_SKIP() << "Reason: Invalid yaml is parsed successfully"; + execYAMLTest(T_3HFZ); } TEST_F(FromYAMLTest, T_3MYT) { - ASSERT_EQ(execYAMLTest(T_3MYT),"OK"); + execYAMLTest(T_3MYT); } TEST_F(FromYAMLTest, T_3R3P) { - ASSERT_EQ(execYAMLTest(T_3R3P),"OK"); + execYAMLTest(T_3R3P); } TEST_F(FromYAMLTest, T_3RLN) { - ASSERT_EQ(execYAMLTest(T_3RLN),"OK"); + execYAMLTest(T_3RLN); } TEST_F(FromYAMLTest, T_3UYS) { - ASSERT_EQ(execYAMLTest(T_3UYS),"OK"); + execYAMLTest(T_3UYS); } TEST_F(FromYAMLTest, T_4ABK) { - ASSERT_EQ(execYAMLTest(T_4ABK),"OK"); + execYAMLTest(T_4ABK); } TEST_F(FromYAMLTest, T_4CQQ) { - ASSERT_EQ(execYAMLTest(T_4CQQ),"OK"); + execYAMLTest(T_4CQQ); } TEST_F(FromYAMLTest, T_4EJS) { - ASSERT_EQ(execYAMLTest(T_4EJS),"OK"); + GTEST_SKIP() << "Reason: Invalid yaml is parsed successfully"; + execYAMLTest(T_4EJS); } TEST_F(FromYAMLTest, T_4FJ6) { - ASSERT_EQ(execYAMLTest(T_4FJ6),"OK"); + execYAMLTest(T_4FJ6); } TEST_F(FromYAMLTest, T_4GC6) { - ASSERT_EQ(execYAMLTest(T_4GC6),"OK"); + execYAMLTest(T_4GC6); } TEST_F(FromYAMLTest, T_4H7K) { - ASSERT_EQ(execYAMLTest(T_4H7K),"OK"); + execYAMLTest(T_4H7K); } TEST_F(FromYAMLTest, T_4HVU) { - ASSERT_EQ(execYAMLTest(T_4HVU),"OK"); + execYAMLTest(T_4HVU); } TEST_F(FromYAMLTest, T_4JVG) { - ASSERT_EQ(execYAMLTest(T_4JVG),"OK"); + execYAMLTest(T_4JVG); } TEST_F(FromYAMLTest, T_4MUZ) { - ASSERT_EQ(execYAMLTest(T_4MUZ),"OK"); + execYAMLTest(T_4MUZ); } TEST_F(FromYAMLTest, T_4Q9F) { - ASSERT_EQ(execYAMLTest(T_4Q9F),"OK"); + execYAMLTest(T_4Q9F); } TEST_F(FromYAMLTest, T_4QFQ) { - ASSERT_EQ(execYAMLTest(T_4QFQ),"OK"); + execYAMLTest(T_4QFQ); } TEST_F(FromYAMLTest, T_4RWC) { - ASSERT_EQ(execYAMLTest(T_4RWC),"OK"); + execYAMLTest(T_4RWC); } TEST_F(FromYAMLTest, T_4UYU) { - ASSERT_EQ(execYAMLTest(T_4UYU),"OK"); + execYAMLTest(T_4UYU); } TEST_F(FromYAMLTest, T_4V8U) { - ASSERT_EQ(execYAMLTest(T_4V8U),"OK"); + execYAMLTest(T_4V8U); } TEST_F(FromYAMLTest, T_4WA9) { - ASSERT_EQ(execYAMLTest(T_4WA9),"OK"); + execYAMLTest(T_4WA9); } TEST_F(FromYAMLTest, T_4ZYM) { - ASSERT_EQ(execYAMLTest(T_4ZYM),"OK"); + execYAMLTest(T_4ZYM); } TEST_F(FromYAMLTest, T_52DL) { - ASSERT_EQ(execYAMLTest(T_52DL),"OK"); + execYAMLTest(T_52DL); } TEST_F(FromYAMLTest, T_54T7) { - ASSERT_EQ(execYAMLTest(T_54T7),"OK"); + execYAMLTest(T_54T7); } TEST_F(FromYAMLTest, T_55WF) { - ASSERT_EQ(execYAMLTest(T_55WF),"OK"); + execYAMLTest(T_55WF); } TEST_F(FromYAMLTest, T_565N) { @@ -12002,1239 +12009,1271 @@ namespace nix { } TEST_F(FromYAMLTest, T_57H4) { - ASSERT_EQ(execYAMLTest(T_57H4),"OK"); + execYAMLTest(T_57H4); } TEST_F(FromYAMLTest, T_58MP) { - ASSERT_EQ(execYAMLTest(T_58MP),"OK"); + execYAMLTest(T_58MP); } TEST_F(FromYAMLTest, T_5BVJ) { - ASSERT_EQ(execYAMLTest(T_5BVJ),"OK"); + execYAMLTest(T_5BVJ); } TEST_F(FromYAMLTest, T_5C5M) { - ASSERT_EQ(execYAMLTest(T_5C5M),"OK"); + execYAMLTest(T_5C5M); } TEST_F(FromYAMLTest, T_5GBF) { - ASSERT_EQ(execYAMLTest(T_5GBF),"OK"); + execYAMLTest(T_5GBF); } TEST_F(FromYAMLTest, T_5KJE) { - ASSERT_EQ(execYAMLTest(T_5KJE),"OK"); + execYAMLTest(T_5KJE); } TEST_F(FromYAMLTest, T_5LLU) { - ASSERT_EQ(execYAMLTest(T_5LLU),"OK"); + execYAMLTest(T_5LLU); } TEST_F(FromYAMLTest, T_5MUD) { - ASSERT_EQ(execYAMLTest(T_5MUD),"OK"); + execYAMLTest(T_5MUD); } TEST_F(FromYAMLTest, T_5NYZ) { - ASSERT_EQ(execYAMLTest(T_5NYZ),"OK"); + execYAMLTest(T_5NYZ); } TEST_F(FromYAMLTest, T_5T43) { - ASSERT_EQ(execYAMLTest(T_5T43),"OK"); + execYAMLTest(T_5T43); } TEST_F(FromYAMLTest, T_5TRB) { - ASSERT_EQ(execYAMLTest(T_5TRB),"OK"); + GTEST_SKIP() << "Reason: Invalid yaml is parsed successfully"; + execYAMLTest(T_5TRB); } TEST_F(FromYAMLTest, T_5TYM) { - ASSERT_EQ(execYAMLTest(T_5TYM),"OK"); + execYAMLTest(T_5TYM); } TEST_F(FromYAMLTest, T_5U3A) { - ASSERT_EQ(execYAMLTest(T_5U3A),"OK"); + GTEST_SKIP() << "Reason: Invalid yaml is parsed successfully"; + execYAMLTest(T_5U3A); } TEST_F(FromYAMLTest, T_5WE3) { - ASSERT_EQ(execYAMLTest(T_5WE3),"OK"); + execYAMLTest(T_5WE3); } TEST_F(FromYAMLTest, T_62EZ) { - ASSERT_EQ(execYAMLTest(T_62EZ),"OK"); + execYAMLTest(T_62EZ); } TEST_F(FromYAMLTest, T_652Z) { - ASSERT_EQ(execYAMLTest(T_652Z),"OK"); + execYAMLTest(T_652Z); } TEST_F(FromYAMLTest, T_65WH) { - ASSERT_EQ(execYAMLTest(T_65WH),"OK"); + execYAMLTest(T_65WH); } TEST_F(FromYAMLTest, T_6BCT) { - ASSERT_EQ(execYAMLTest(T_6BCT),"OK"); + execYAMLTest(T_6BCT); } TEST_F(FromYAMLTest, T_6BFJ) { - ASSERT_EQ(execYAMLTest(T_6BFJ),"OK"); + execYAMLTest(T_6BFJ); } TEST_F(FromYAMLTest, T_6CA3) { - ASSERT_EQ(execYAMLTest(T_6CA3),"OK"); + execYAMLTest(T_6CA3); } TEST_F(FromYAMLTest, T_6CK3) { - ASSERT_EQ(execYAMLTest(T_6CK3),"OK"); + execYAMLTest(T_6CK3); } TEST_F(FromYAMLTest, T_6FWR) { - ASSERT_EQ(execYAMLTest(T_6FWR),"OK"); + execYAMLTest(T_6FWR); } TEST_F(FromYAMLTest, T_6H3V) { - ASSERT_EQ(execYAMLTest(T_6H3V),"OK"); + execYAMLTest(T_6H3V); } TEST_F(FromYAMLTest, T_6HB6) { - ASSERT_EQ(execYAMLTest(T_6HB6),"OK"); + execYAMLTest(T_6HB6); } TEST_F(FromYAMLTest, T_6JQW) { - ASSERT_EQ(execYAMLTest(T_6JQW),"OK"); + execYAMLTest(T_6JQW); } TEST_F(FromYAMLTest, T_6JTT) { - ASSERT_EQ(execYAMLTest(T_6JTT),"OK"); + execYAMLTest(T_6JTT); } TEST_F(FromYAMLTest, T_6JWB) { - ASSERT_EQ(execYAMLTest(T_6JWB),"OK"); + execYAMLTest(T_6JWB); } TEST_F(FromYAMLTest, T_6KGN) { - ASSERT_EQ(execYAMLTest(T_6KGN),"OK"); + execYAMLTest(T_6KGN); } TEST_F(FromYAMLTest, T_6LVF) { - ASSERT_EQ(execYAMLTest(T_6LVF),"OK"); + execYAMLTest(T_6LVF); } TEST_F(FromYAMLTest, T_6M2F) { - ASSERT_EQ(execYAMLTest(T_6M2F),"OK"); + execYAMLTest(T_6M2F); } TEST_F(FromYAMLTest, T_6PBE) { - ASSERT_EQ(execYAMLTest(T_6PBE),"OK"); + execYAMLTest(T_6PBE); } TEST_F(FromYAMLTest, T_6S55) { - ASSERT_EQ(execYAMLTest(T_6S55),"OK"); + execYAMLTest(T_6S55); } TEST_F(FromYAMLTest, T_6SLA) { - ASSERT_EQ(execYAMLTest(T_6SLA),"OK"); + execYAMLTest(T_6SLA); } TEST_F(FromYAMLTest, T_6VJK) { - ASSERT_EQ(execYAMLTest(T_6VJK),"OK"); + execYAMLTest(T_6VJK); } TEST_F(FromYAMLTest, T_6WLZ) { - ASSERT_EQ(execYAMLTest(T_6WLZ),"OK"); + execYAMLTest(T_6WLZ); } TEST_F(FromYAMLTest, T_6WPF) { - ASSERT_EQ(execYAMLTest(T_6WPF),"OK"); + execYAMLTest(T_6WPF); } TEST_F(FromYAMLTest, T_6XDY) { - ASSERT_EQ(execYAMLTest(T_6XDY),"OK"); + execYAMLTest(T_6XDY); } TEST_F(FromYAMLTest, T_6ZKB) { - ASSERT_EQ(execYAMLTest(T_6ZKB),"OK"); + execYAMLTest(T_6ZKB); } TEST_F(FromYAMLTest, T_735Y) { - ASSERT_EQ(execYAMLTest(T_735Y),"OK"); + execYAMLTest(T_735Y); } TEST_F(FromYAMLTest, T_74H7) { - ASSERT_EQ(execYAMLTest(T_74H7),"OK"); + execYAMLTest(T_74H7); } TEST_F(FromYAMLTest, T_753E) { - ASSERT_EQ(execYAMLTest(T_753E),"OK"); + execYAMLTest(T_753E); } TEST_F(FromYAMLTest, T_7A4E) { - ASSERT_EQ(execYAMLTest(T_7A4E),"OK"); + execYAMLTest(T_7A4E); } TEST_F(FromYAMLTest, T_7BMT) { - ASSERT_EQ(execYAMLTest(T_7BMT),"OK"); + execYAMLTest(T_7BMT); } TEST_F(FromYAMLTest, T_7BUB) { - ASSERT_EQ(execYAMLTest(T_7BUB),"OK"); + execYAMLTest(T_7BUB); } TEST_F(FromYAMLTest, T_7FWL) { - ASSERT_EQ(execYAMLTest(T_7FWL),"OK"); + execYAMLTest(T_7FWL); } TEST_F(FromYAMLTest, T_7LBH) { - ASSERT_EQ(execYAMLTest(T_7LBH),"OK"); + GTEST_SKIP() << "Reason: Invalid yaml is parsed successfully"; + execYAMLTest(T_7LBH); } TEST_F(FromYAMLTest, T_7MNF) { - ASSERT_EQ(execYAMLTest(T_7MNF),"OK"); + execYAMLTest(T_7MNF); } TEST_F(FromYAMLTest, T_7T8X) { - ASSERT_EQ(execYAMLTest(T_7T8X),"OK"); + execYAMLTest(T_7T8X); } TEST_F(FromYAMLTest, T_7TMG) { - ASSERT_EQ(execYAMLTest(T_7TMG),"OK"); + execYAMLTest(T_7TMG); } TEST_F(FromYAMLTest, T_7W2P) { - ASSERT_EQ(execYAMLTest(T_7W2P),"OK"); + execYAMLTest(T_7W2P); } TEST_F(FromYAMLTest, T_7Z25) { - ASSERT_EQ(execYAMLTest(T_7Z25),"OK"); + execYAMLTest(T_7Z25); } TEST_F(FromYAMLTest, T_7ZZ5) { - ASSERT_EQ(execYAMLTest(T_7ZZ5),"OK"); + execYAMLTest(T_7ZZ5); } TEST_F(FromYAMLTest, T_82AN) { - ASSERT_EQ(execYAMLTest(T_82AN),"OK"); + execYAMLTest(T_82AN); } TEST_F(FromYAMLTest, T_87E4) { - ASSERT_EQ(execYAMLTest(T_87E4),"OK"); + execYAMLTest(T_87E4); } TEST_F(FromYAMLTest, T_8CWC) { - ASSERT_EQ(execYAMLTest(T_8CWC),"OK"); + execYAMLTest(T_8CWC); } TEST_F(FromYAMLTest, T_8G76) { - ASSERT_EQ(execYAMLTest(T_8G76),"OK"); + execYAMLTest(T_8G76); } TEST_F(FromYAMLTest, T_8KB6) { - ASSERT_EQ(execYAMLTest(T_8KB6),"OK"); + execYAMLTest(T_8KB6); } TEST_F(FromYAMLTest, T_8MK2) { - ASSERT_EQ(execYAMLTest(T_8MK2),"OK"); + execYAMLTest(T_8MK2); } TEST_F(FromYAMLTest, T_8QBE) { - ASSERT_EQ(execYAMLTest(T_8QBE),"OK"); + execYAMLTest(T_8QBE); } TEST_F(FromYAMLTest, T_8UDB) { - ASSERT_EQ(execYAMLTest(T_8UDB),"OK"); + execYAMLTest(T_8UDB); } TEST_F(FromYAMLTest, T_8XDJ) { - ASSERT_EQ(execYAMLTest(T_8XDJ),"OK"); + execYAMLTest(T_8XDJ); } TEST_F(FromYAMLTest, T_8XYN) { - ASSERT_EQ(execYAMLTest(T_8XYN),"OK"); + execYAMLTest(T_8XYN); } TEST_F(FromYAMLTest, T_93JH) { - ASSERT_EQ(execYAMLTest(T_93JH),"OK"); + execYAMLTest(T_93JH); } TEST_F(FromYAMLTest, T_93WF) { - ASSERT_EQ(execYAMLTest(T_93WF),"OK"); + execYAMLTest(T_93WF); } TEST_F(FromYAMLTest, T_96L6) { - ASSERT_EQ(execYAMLTest(T_96L6),"OK"); + execYAMLTest(T_96L6); } TEST_F(FromYAMLTest, T_96NN) { - ASSERT_EQ(execYAMLTest(T_96NN),"OK"); + execYAMLTest(T_96NN); } TEST_F(FromYAMLTest, T_98YD) { - ASSERT_EQ(execYAMLTest(T_98YD),"OK"); + execYAMLTest(T_98YD); } TEST_F(FromYAMLTest, T_9BXH) { - ASSERT_EQ(execYAMLTest(T_9BXH),"OK"); + execYAMLTest(T_9BXH); } TEST_F(FromYAMLTest, T_9C9N) { - ASSERT_EQ(execYAMLTest(T_9C9N),"OK"); + GTEST_SKIP() << "Reason: Invalid yaml is parsed successfully"; + execYAMLTest(T_9C9N); } TEST_F(FromYAMLTest, T_9CWY) { - ASSERT_EQ(execYAMLTest(T_9CWY),"OK"); + execYAMLTest(T_9CWY); } TEST_F(FromYAMLTest, T_9DXL) { - ASSERT_EQ(execYAMLTest(T_9DXL),"OK"); + execYAMLTest(T_9DXL); } TEST_F(FromYAMLTest, T_9FMG) { - ASSERT_EQ(execYAMLTest(T_9FMG),"OK"); + execYAMLTest(T_9FMG); } TEST_F(FromYAMLTest, T_9HCY) { - ASSERT_EQ(execYAMLTest(T_9HCY),"OK"); + execYAMLTest(T_9HCY); } TEST_F(FromYAMLTest, T_9J7A) { - ASSERT_EQ(execYAMLTest(T_9J7A),"OK"); + execYAMLTest(T_9J7A); } TEST_F(FromYAMLTest, T_9JBA) { - ASSERT_EQ(execYAMLTest(T_9JBA),"OK"); + execYAMLTest(T_9JBA); } TEST_F(FromYAMLTest, T_9KAX) { - ASSERT_EQ(execYAMLTest(T_9KAX),"OK"); + execYAMLTest(T_9KAX); } TEST_F(FromYAMLTest, T_9KBC) { - ASSERT_EQ(execYAMLTest(T_9KBC),"OK"); + execYAMLTest(T_9KBC); } TEST_F(FromYAMLTest, T_9MAG) { - ASSERT_EQ(execYAMLTest(T_9MAG),"OK"); + execYAMLTest(T_9MAG); } TEST_F(FromYAMLTest, T_9MMA) { - ASSERT_EQ(execYAMLTest(T_9MMA),"OK"); + execYAMLTest(T_9MMA); } TEST_F(FromYAMLTest, T_9MMW) { - ASSERT_EQ(execYAMLTest(T_9MMW),"OK"); + execYAMLTest(T_9MMW); } TEST_F(FromYAMLTest, T_9MQT) { - ASSERT_EQ(execYAMLTest(T_9MQT),"OK"); + GTEST_SKIP() << "Reason: Invalid yaml is parsed successfully"; + execYAMLTest(T_9MQT); } TEST_F(FromYAMLTest, T_9SA2) { - ASSERT_EQ(execYAMLTest(T_9SA2),"OK"); + execYAMLTest(T_9SA2); } TEST_F(FromYAMLTest, T_9SHH) { - ASSERT_EQ(execYAMLTest(T_9SHH),"OK"); + execYAMLTest(T_9SHH); } TEST_F(FromYAMLTest, T_9TFX) { - ASSERT_EQ(execYAMLTest(T_9TFX),"OK"); + execYAMLTest(T_9TFX); } TEST_F(FromYAMLTest, T_9U5K) { - ASSERT_EQ(execYAMLTest(T_9U5K),"OK"); + execYAMLTest(T_9U5K); } TEST_F(FromYAMLTest, T_9WXW) { - ASSERT_EQ(execYAMLTest(T_9WXW),"OK"); + execYAMLTest(T_9WXW); } TEST_F(FromYAMLTest, T_9YRD) { - ASSERT_EQ(execYAMLTest(T_9YRD),"OK"); + execYAMLTest(T_9YRD); } TEST_F(FromYAMLTest, T_A2M4) { - ASSERT_EQ(execYAMLTest(T_A2M4),"OK"); + execYAMLTest(T_A2M4); } TEST_F(FromYAMLTest, T_A6F9) { - ASSERT_EQ(execYAMLTest(T_A6F9),"OK"); + execYAMLTest(T_A6F9); } TEST_F(FromYAMLTest, T_A984) { - ASSERT_EQ(execYAMLTest(T_A984),"OK"); + execYAMLTest(T_A984); } TEST_F(FromYAMLTest, T_AB8U) { - ASSERT_EQ(execYAMLTest(T_AB8U),"OK"); + execYAMLTest(T_AB8U); } TEST_F(FromYAMLTest, T_AVM7) { - ASSERT_EQ(execYAMLTest(T_AVM7),"OK"); + execYAMLTest(T_AVM7); } TEST_F(FromYAMLTest, T_AZ63) { - ASSERT_EQ(execYAMLTest(T_AZ63),"OK"); + execYAMLTest(T_AZ63); } TEST_F(FromYAMLTest, T_AZW3) { - ASSERT_EQ(execYAMLTest(T_AZW3),"OK"); + execYAMLTest(T_AZW3); } TEST_F(FromYAMLTest, T_B3HG) { - ASSERT_EQ(execYAMLTest(T_B3HG),"OK"); + execYAMLTest(T_B3HG); } TEST_F(FromYAMLTest, T_B63P) { - ASSERT_EQ(execYAMLTest(T_B63P),"OK"); + execYAMLTest(T_B63P); } TEST_F(FromYAMLTest, T_BD7L) { - ASSERT_EQ(execYAMLTest(T_BD7L),"OK"); + execYAMLTest(T_BD7L); } TEST_F(FromYAMLTest, T_BEC7) { - ASSERT_EQ(execYAMLTest(T_BEC7),"OK"); + execYAMLTest(T_BEC7); } TEST_F(FromYAMLTest, T_BF9H) { - ASSERT_EQ(execYAMLTest(T_BF9H),"OK"); + execYAMLTest(T_BF9H); } TEST_F(FromYAMLTest, T_BS4K) { - ASSERT_EQ(execYAMLTest(T_BS4K),"OK"); + execYAMLTest(T_BS4K); } TEST_F(FromYAMLTest, T_BU8L) { - ASSERT_EQ(execYAMLTest(T_BU8L),"OK"); + execYAMLTest(T_BU8L); } TEST_F(FromYAMLTest, T_C2DT) { - ASSERT_EQ(execYAMLTest(T_C2DT),"OK"); + execYAMLTest(T_C2DT); } TEST_F(FromYAMLTest, T_C2SP) { - ASSERT_EQ(execYAMLTest(T_C2SP),"OK"); + execYAMLTest(T_C2SP); } TEST_F(FromYAMLTest, T_C4HZ) { - ASSERT_EQ(execYAMLTest(T_C4HZ),"OK"); + execYAMLTest(T_C4HZ); } TEST_F(FromYAMLTest, T_CC74) { - ASSERT_EQ(execYAMLTest(T_CC74),"OK"); + execYAMLTest(T_CC74); } TEST_F(FromYAMLTest, T_CFD4) { - ASSERT_EQ(execYAMLTest(T_CFD4),"OK"); + execYAMLTest(T_CFD4); } TEST_F(FromYAMLTest, T_CML9) { - ASSERT_EQ(execYAMLTest(T_CML9),"OK"); + execYAMLTest(T_CML9); } TEST_F(FromYAMLTest, T_CN3R) { - ASSERT_EQ(execYAMLTest(T_CN3R),"OK"); + execYAMLTest(T_CN3R); } TEST_F(FromYAMLTest, T_CPZ3) { - ASSERT_EQ(execYAMLTest(T_CPZ3),"OK"); + execYAMLTest(T_CPZ3); } TEST_F(FromYAMLTest, T_CQ3W) { - ASSERT_EQ(execYAMLTest(T_CQ3W),"OK"); + execYAMLTest(T_CQ3W); } TEST_F(FromYAMLTest, T_CT4Q) { - ASSERT_EQ(execYAMLTest(T_CT4Q),"OK"); + execYAMLTest(T_CT4Q); } TEST_F(FromYAMLTest, T_CTN5) { - ASSERT_EQ(execYAMLTest(T_CTN5),"OK"); + execYAMLTest(T_CTN5); } TEST_F(FromYAMLTest, T_CUP7) { - ASSERT_EQ(execYAMLTest(T_CUP7),"OK"); + execYAMLTest(T_CUP7); } TEST_F(FromYAMLTest, T_CVW2) { - ASSERT_EQ(execYAMLTest(T_CVW2),"OK"); + GTEST_SKIP() << "Reason: Invalid yaml is parsed successfully"; + execYAMLTest(T_CVW2); } TEST_F(FromYAMLTest, T_CXX2) { - ASSERT_EQ(execYAMLTest(T_CXX2),"OK"); + GTEST_SKIP() << "Reason: Invalid yaml is parsed successfully"; + execYAMLTest(T_CXX2); } TEST_F(FromYAMLTest, T_D49Q) { - ASSERT_EQ(execYAMLTest(T_D49Q),"OK"); + GTEST_SKIP() << "Reason: Invalid yaml is parsed successfully"; + execYAMLTest(T_D49Q); } TEST_F(FromYAMLTest, T_D83L) { - ASSERT_EQ(execYAMLTest(T_D83L),"OK"); + execYAMLTest(T_D83L); } TEST_F(FromYAMLTest, T_D88J) { - ASSERT_EQ(execYAMLTest(T_D88J),"OK"); + execYAMLTest(T_D88J); } TEST_F(FromYAMLTest, T_D9TU) { - ASSERT_EQ(execYAMLTest(T_D9TU),"OK"); + execYAMLTest(T_D9TU); } TEST_F(FromYAMLTest, T_DBG4) { - ASSERT_EQ(execYAMLTest(T_DBG4),"OK"); + execYAMLTest(T_DBG4); } TEST_F(FromYAMLTest, T_DC7X) { - ASSERT_EQ(execYAMLTest(T_DC7X),"OK"); + execYAMLTest(T_DC7X); } TEST_F(FromYAMLTest, T_DE56) { - ASSERT_EQ(execYAMLTest(T_DE56),"OK"); + execYAMLTest(T_DE56); } TEST_F(FromYAMLTest, T_DFF7) { - ASSERT_EQ(execYAMLTest(T_DFF7),"OK"); + execYAMLTest(T_DFF7); } TEST_F(FromYAMLTest, T_DHP8) { - ASSERT_EQ(execYAMLTest(T_DHP8),"OK"); + execYAMLTest(T_DHP8); } TEST_F(FromYAMLTest, T_DK3J) { - ASSERT_EQ(execYAMLTest(T_DK3J),"OK"); + execYAMLTest(T_DK3J); } TEST_F(FromYAMLTest, T_DK4H) { - ASSERT_EQ(execYAMLTest(T_DK4H),"OK"); + GTEST_SKIP() << "Reason: Invalid yaml is parsed successfully"; + execYAMLTest(T_DK4H); } TEST_F(FromYAMLTest, T_DK95) { - ASSERT_EQ(execYAMLTest(T_DK95),"OK"); + GTEST_SKIP() << "Reason: Invalid yaml is parsed successfully"; + execYAMLTest(T_DK95); } TEST_F(FromYAMLTest, T_DMG6) { - ASSERT_EQ(execYAMLTest(T_DMG6),"OK"); + execYAMLTest(T_DMG6); } TEST_F(FromYAMLTest, T_DWX9) { - ASSERT_EQ(execYAMLTest(T_DWX9),"OK"); + execYAMLTest(T_DWX9); } TEST_F(FromYAMLTest, T_E76Z) { - ASSERT_EQ(execYAMLTest(T_E76Z),"OK"); + execYAMLTest(T_E76Z); } TEST_F(FromYAMLTest, T_EB22) { - ASSERT_EQ(execYAMLTest(T_EB22),"OK"); + execYAMLTest(T_EB22); } TEST_F(FromYAMLTest, T_EHF6) { - ASSERT_EQ(execYAMLTest(T_EHF6),"OK"); + execYAMLTest(T_EHF6); } TEST_F(FromYAMLTest, T_EW3V) { - ASSERT_EQ(execYAMLTest(T_EW3V),"OK"); + execYAMLTest(T_EW3V); } TEST_F(FromYAMLTest, T_EX5H) { - ASSERT_EQ(execYAMLTest(T_EX5H),"OK"); + execYAMLTest(T_EX5H); } TEST_F(FromYAMLTest, T_EXG3) { - ASSERT_EQ(execYAMLTest(T_EXG3),"OK"); + execYAMLTest(T_EXG3); } TEST_F(FromYAMLTest, T_F2C7) { - ASSERT_EQ(execYAMLTest(T_F2C7),"OK"); + execYAMLTest(T_F2C7); } TEST_F(FromYAMLTest, T_F3CP) { - ASSERT_EQ(execYAMLTest(T_F3CP),"OK"); + execYAMLTest(T_F3CP); } TEST_F(FromYAMLTest, T_F6MC) { - ASSERT_EQ(execYAMLTest(T_F6MC),"OK"); + execYAMLTest(T_F6MC); } TEST_F(FromYAMLTest, T_F8F9) { - ASSERT_EQ(execYAMLTest(T_F8F9),"OK"); + execYAMLTest(T_F8F9); } TEST_F(FromYAMLTest, T_FBC9) { - ASSERT_EQ(execYAMLTest(T_FBC9),"OK"); + execYAMLTest(T_FBC9); } TEST_F(FromYAMLTest, T_FH7J) { - ASSERT_EQ(execYAMLTest(T_FH7J),"OK"); + execYAMLTest(T_FH7J); } TEST_F(FromYAMLTest, T_FP8R) { - ASSERT_EQ(execYAMLTest(T_FP8R),"OK"); + execYAMLTest(T_FP8R); } TEST_F(FromYAMLTest, T_FQ7F) { - ASSERT_EQ(execYAMLTest(T_FQ7F),"OK"); + execYAMLTest(T_FQ7F); } TEST_F(FromYAMLTest, T_FRK4) { - ASSERT_EQ(execYAMLTest(T_FRK4),"OK"); + execYAMLTest(T_FRK4); } TEST_F(FromYAMLTest, T_FTA2) { - ASSERT_EQ(execYAMLTest(T_FTA2),"OK"); + execYAMLTest(T_FTA2); } TEST_F(FromYAMLTest, T_FUP4) { - ASSERT_EQ(execYAMLTest(T_FUP4),"OK"); + execYAMLTest(T_FUP4); } TEST_F(FromYAMLTest, T_G4RS) { - ASSERT_EQ(execYAMLTest(T_G4RS),"OK"); + execYAMLTest(T_G4RS); } TEST_F(FromYAMLTest, T_G5U8) { - ASSERT_EQ(execYAMLTest(T_G5U8),"OK"); + GTEST_SKIP() << "Reason: Invalid yaml is parsed successfully"; + execYAMLTest(T_G5U8); } TEST_F(FromYAMLTest, T_G7JE) { - ASSERT_EQ(execYAMLTest(T_G7JE),"OK"); + execYAMLTest(T_G7JE); } TEST_F(FromYAMLTest, T_G992) { - ASSERT_EQ(execYAMLTest(T_G992),"OK"); + execYAMLTest(T_G992); } TEST_F(FromYAMLTest, T_G9HC) { - ASSERT_EQ(execYAMLTest(T_G9HC),"OK"); + execYAMLTest(T_G9HC); } TEST_F(FromYAMLTest, T_GDY7) { - ASSERT_EQ(execYAMLTest(T_GDY7),"OK"); + execYAMLTest(T_GDY7); } TEST_F(FromYAMLTest, T_GH63) { - ASSERT_EQ(execYAMLTest(T_GH63),"OK"); + execYAMLTest(T_GH63); } TEST_F(FromYAMLTest, T_GT5M) { - ASSERT_EQ(execYAMLTest(T_GT5M),"OK"); + execYAMLTest(T_GT5M); } TEST_F(FromYAMLTest, T_H2RW) { - ASSERT_EQ(execYAMLTest(T_H2RW),"OK"); + execYAMLTest(T_H2RW); } TEST_F(FromYAMLTest, T_H3Z8) { - ASSERT_EQ(execYAMLTest(T_H3Z8),"OK"); + execYAMLTest(T_H3Z8); } TEST_F(FromYAMLTest, T_H7J7) { - ASSERT_EQ(execYAMLTest(T_H7J7),"OK"); + execYAMLTest(T_H7J7); } + /** This test is ignored because these tests are not required to fail and rapidyaml ignores the YAML version string. TEST_F(FromYAMLTest, T_H7TQ) { - ASSERT_EQ(execYAMLTest(T_H7TQ),"OK"); + execYAMLTest(T_H7TQ); } + */ TEST_F(FromYAMLTest, T_HM87) { - ASSERT_EQ(execYAMLTest(T_HM87),"OK"); + execYAMLTest(T_HM87); } TEST_F(FromYAMLTest, T_HMK4) { - ASSERT_EQ(execYAMLTest(T_HMK4),"OK"); + execYAMLTest(T_HMK4); } TEST_F(FromYAMLTest, T_HMQ5) { - ASSERT_EQ(execYAMLTest(T_HMQ5),"OK"); + execYAMLTest(T_HMQ5); } TEST_F(FromYAMLTest, T_HRE5) { - ASSERT_EQ(execYAMLTest(T_HRE5),"OK"); + execYAMLTest(T_HRE5); } TEST_F(FromYAMLTest, T_HS5T) { - ASSERT_EQ(execYAMLTest(T_HS5T),"OK"); + execYAMLTest(T_HS5T); } TEST_F(FromYAMLTest, T_HU3P) { - ASSERT_EQ(execYAMLTest(T_HU3P),"OK"); + execYAMLTest(T_HU3P); } TEST_F(FromYAMLTest, T_HWV9) { - ASSERT_EQ(execYAMLTest(T_HWV9),"OK"); + execYAMLTest(T_HWV9); } TEST_F(FromYAMLTest, T_J3BT) { - ASSERT_EQ(execYAMLTest(T_J3BT),"OK"); + execYAMLTest(T_J3BT); } TEST_F(FromYAMLTest, T_J5UC) { - ASSERT_EQ(execYAMLTest(T_J5UC),"OK"); + execYAMLTest(T_J5UC); } TEST_F(FromYAMLTest, T_J7PZ) { - ASSERT_EQ(execYAMLTest(T_J7PZ),"OK"); + execYAMLTest(T_J7PZ); } TEST_F(FromYAMLTest, T_J7VC) { - ASSERT_EQ(execYAMLTest(T_J7VC),"OK"); + execYAMLTest(T_J7VC); } TEST_F(FromYAMLTest, T_J9HZ) { - ASSERT_EQ(execYAMLTest(T_J9HZ),"OK"); + execYAMLTest(T_J9HZ); } TEST_F(FromYAMLTest, T_JEF9) { - ASSERT_EQ(execYAMLTest(T_JEF9),"OK"); + execYAMLTest(T_JEF9); } TEST_F(FromYAMLTest, T_JHB9) { - ASSERT_EQ(execYAMLTest(T_JHB9),"OK"); + execYAMLTest(T_JHB9); } TEST_F(FromYAMLTest, T_JKF3) { - ASSERT_EQ(execYAMLTest(T_JKF3),"OK"); + GTEST_SKIP() << "Reason: Invalid yaml is parsed successfully"; + execYAMLTest(T_JKF3); } TEST_F(FromYAMLTest, T_JQ4R) { - ASSERT_EQ(execYAMLTest(T_JQ4R),"OK"); + execYAMLTest(T_JQ4R); } TEST_F(FromYAMLTest, T_JR7V) { - ASSERT_EQ(execYAMLTest(T_JR7V),"OK"); + execYAMLTest(T_JR7V); } TEST_F(FromYAMLTest, T_JS2J) { - ASSERT_EQ(execYAMLTest(T_JS2J),"OK"); + execYAMLTest(T_JS2J); } TEST_F(FromYAMLTest, T_JTV5) { - ASSERT_EQ(execYAMLTest(T_JTV5),"OK"); + execYAMLTest(T_JTV5); } TEST_F(FromYAMLTest, T_JY7Z) { - ASSERT_EQ(execYAMLTest(T_JY7Z),"OK"); + execYAMLTest(T_JY7Z); } TEST_F(FromYAMLTest, T_K3WX) { - ASSERT_EQ(execYAMLTest(T_K3WX),"OK"); + execYAMLTest(T_K3WX); } TEST_F(FromYAMLTest, T_K4SU) { - ASSERT_EQ(execYAMLTest(T_K4SU),"OK"); + execYAMLTest(T_K4SU); } TEST_F(FromYAMLTest, T_K527) { - ASSERT_EQ(execYAMLTest(T_K527),"OK"); + execYAMLTest(T_K527); } TEST_F(FromYAMLTest, T_K54U) { - ASSERT_EQ(execYAMLTest(T_K54U),"OK"); + execYAMLTest(T_K54U); } TEST_F(FromYAMLTest, T_K858) { - ASSERT_EQ(execYAMLTest(T_K858),"OK"); + execYAMLTest(T_K858); } TEST_F(FromYAMLTest, T_KH5V) { - ASSERT_EQ(execYAMLTest(T_KH5V),"OK"); + execYAMLTest(T_KH5V); } TEST_F(FromYAMLTest, T_KK5P) { - ASSERT_EQ(execYAMLTest(T_KK5P),"OK"); + execYAMLTest(T_KK5P); } TEST_F(FromYAMLTest, T_KMK3) { - ASSERT_EQ(execYAMLTest(T_KMK3),"OK"); + execYAMLTest(T_KMK3); } TEST_F(FromYAMLTest, T_KS4U) { - ASSERT_EQ(execYAMLTest(T_KS4U),"OK"); + execYAMLTest(T_KS4U); } TEST_F(FromYAMLTest, T_KSS4) { - ASSERT_EQ(execYAMLTest(T_KSS4),"OK"); + execYAMLTest(T_KSS4); } TEST_F(FromYAMLTest, T_L24T) { - ASSERT_EQ(execYAMLTest(T_L24T),"OK"); + execYAMLTest(T_L24T); } TEST_F(FromYAMLTest, T_L383) { - ASSERT_EQ(execYAMLTest(T_L383),"OK"); + execYAMLTest(T_L383); } TEST_F(FromYAMLTest, T_L94M) { - ASSERT_EQ(execYAMLTest(T_L94M),"OK"); + execYAMLTest(T_L94M); } TEST_F(FromYAMLTest, T_L9U5) { - ASSERT_EQ(execYAMLTest(T_L9U5),"OK"); + execYAMLTest(T_L9U5); } TEST_F(FromYAMLTest, T_LE5A) { - ASSERT_EQ(execYAMLTest(T_LE5A),"OK"); + execYAMLTest(T_LE5A); } TEST_F(FromYAMLTest, T_LHL4) { - ASSERT_EQ(execYAMLTest(T_LHL4),"OK"); + execYAMLTest(T_LHL4); } TEST_F(FromYAMLTest, T_LP6E) { - ASSERT_EQ(execYAMLTest(T_LP6E),"OK"); + execYAMLTest(T_LP6E); } TEST_F(FromYAMLTest, T_LQZ7) { - ASSERT_EQ(execYAMLTest(T_LQZ7),"OK"); + execYAMLTest(T_LQZ7); } TEST_F(FromYAMLTest, T_LX3P) { - ASSERT_EQ(execYAMLTest(T_LX3P),"OK"); + execYAMLTest(T_LX3P); } TEST_F(FromYAMLTest, T_M29M) { - ASSERT_EQ(execYAMLTest(T_M29M),"OK"); + execYAMLTest(T_M29M); } TEST_F(FromYAMLTest, T_M2N8) { - ASSERT_EQ(execYAMLTest(T_M2N8),"OK"); + execYAMLTest(T_M2N8); } TEST_F(FromYAMLTest, T_M5C3) { - ASSERT_EQ(execYAMLTest(T_M5C3),"OK"); + execYAMLTest(T_M5C3); } TEST_F(FromYAMLTest, T_M5DY) { - ASSERT_EQ(execYAMLTest(T_M5DY),"OK"); + execYAMLTest(T_M5DY); } TEST_F(FromYAMLTest, T_M6YH) { - ASSERT_EQ(execYAMLTest(T_M6YH),"OK"); + execYAMLTest(T_M6YH); } TEST_F(FromYAMLTest, T_M7A3) { - ASSERT_EQ(execYAMLTest(T_M7A3),"OK"); + execYAMLTest(T_M7A3); } TEST_F(FromYAMLTest, T_M7NX) { - ASSERT_EQ(execYAMLTest(T_M7NX),"OK"); + execYAMLTest(T_M7NX); } TEST_F(FromYAMLTest, T_M9B4) { - ASSERT_EQ(execYAMLTest(T_M9B4),"OK"); + execYAMLTest(T_M9B4); } TEST_F(FromYAMLTest, T_MJS9) { - ASSERT_EQ(execYAMLTest(T_MJS9),"OK"); + execYAMLTest(T_MJS9); } + /** This test is ignored because these tests are not required to fail and rapidyaml ignores the YAML version string. TEST_F(FromYAMLTest, T_MUS6) { - ASSERT_EQ(execYAMLTest(T_MUS6),"OK"); + execYAMLTest(T_MUS6); } + */ TEST_F(FromYAMLTest, T_MXS3) { - ASSERT_EQ(execYAMLTest(T_MXS3),"OK"); + execYAMLTest(T_MXS3); } TEST_F(FromYAMLTest, T_MYW6) { - ASSERT_EQ(execYAMLTest(T_MYW6),"OK"); + execYAMLTest(T_MYW6); } TEST_F(FromYAMLTest, T_MZX3) { - ASSERT_EQ(execYAMLTest(T_MZX3),"OK"); + execYAMLTest(T_MZX3); } TEST_F(FromYAMLTest, T_N4JP) { - ASSERT_EQ(execYAMLTest(T_N4JP),"OK"); + execYAMLTest(T_N4JP); } TEST_F(FromYAMLTest, T_N782) { - ASSERT_EQ(execYAMLTest(T_N782),"OK"); + GTEST_SKIP() << "Reason: Invalid yaml is parsed successfully"; + execYAMLTest(T_N782); } TEST_F(FromYAMLTest, T_NAT4) { - ASSERT_EQ(execYAMLTest(T_NAT4),"OK"); + execYAMLTest(T_NAT4); } TEST_F(FromYAMLTest, T_NB6Z) { - ASSERT_EQ(execYAMLTest(T_NB6Z),"OK"); + execYAMLTest(T_NB6Z); } TEST_F(FromYAMLTest, T_NHX8) { - ASSERT_EQ(execYAMLTest(T_NHX8),"OK"); + execYAMLTest(T_NHX8); } TEST_F(FromYAMLTest, T_NJ66) { - ASSERT_EQ(execYAMLTest(T_NJ66),"OK"); + execYAMLTest(T_NJ66); } TEST_F(FromYAMLTest, T_NKF9) { - ASSERT_EQ(execYAMLTest(T_NKF9),"OK"); + execYAMLTest(T_NKF9); } TEST_F(FromYAMLTest, T_NP9H) { - ASSERT_EQ(execYAMLTest(T_NP9H),"OK"); + execYAMLTest(T_NP9H); } TEST_F(FromYAMLTest, T_P2AD) { - ASSERT_EQ(execYAMLTest(T_P2AD),"OK"); + execYAMLTest(T_P2AD); } TEST_F(FromYAMLTest, T_P2EQ) { - ASSERT_EQ(execYAMLTest(T_P2EQ),"OK"); + execYAMLTest(T_P2EQ); } TEST_F(FromYAMLTest, T_P76L) { - ASSERT_EQ(execYAMLTest(T_P76L),"OK"); + execYAMLTest(T_P76L); } TEST_F(FromYAMLTest, T_P94K) { - ASSERT_EQ(execYAMLTest(T_P94K),"OK"); + execYAMLTest(T_P94K); } TEST_F(FromYAMLTest, T_PBJ2) { - ASSERT_EQ(execYAMLTest(T_PBJ2),"OK"); + execYAMLTest(T_PBJ2); } TEST_F(FromYAMLTest, T_PRH3) { - ASSERT_EQ(execYAMLTest(T_PRH3),"OK"); + execYAMLTest(T_PRH3); } TEST_F(FromYAMLTest, T_PUW8) { - ASSERT_EQ(execYAMLTest(T_PUW8),"OK"); + execYAMLTest(T_PUW8); } TEST_F(FromYAMLTest, T_PW8X) { - ASSERT_EQ(execYAMLTest(T_PW8X),"OK"); + execYAMLTest(T_PW8X); } TEST_F(FromYAMLTest, T_Q4CL) { - ASSERT_EQ(execYAMLTest(T_Q4CL),"OK"); + execYAMLTest(T_Q4CL); } TEST_F(FromYAMLTest, T_Q5MG) { - ASSERT_EQ(execYAMLTest(T_Q5MG),"OK"); + execYAMLTest(T_Q5MG); } TEST_F(FromYAMLTest, T_Q88A) { - ASSERT_EQ(execYAMLTest(T_Q88A),"OK"); + execYAMLTest(T_Q88A); } TEST_F(FromYAMLTest, T_Q8AD) { - ASSERT_EQ(execYAMLTest(T_Q8AD),"OK"); + execYAMLTest(T_Q8AD); } TEST_F(FromYAMLTest, T_Q9WF) { - ASSERT_EQ(execYAMLTest(T_Q9WF),"OK"); + execYAMLTest(T_Q9WF); } TEST_F(FromYAMLTest, T_QB6E) { - ASSERT_EQ(execYAMLTest(T_QB6E),"OK"); + GTEST_SKIP() << "Reason: Invalid yaml is parsed successfully"; + execYAMLTest(T_QB6E); } TEST_F(FromYAMLTest, T_QF4Y) { - ASSERT_EQ(execYAMLTest(T_QF4Y),"OK"); + execYAMLTest(T_QF4Y); } TEST_F(FromYAMLTest, T_QLJ7) { - ASSERT_EQ(execYAMLTest(T_QLJ7),"OK"); + GTEST_SKIP() << "Reason: Invalid yaml is parsed successfully"; + execYAMLTest(T_QLJ7); } TEST_F(FromYAMLTest, T_QT73) { - ASSERT_EQ(execYAMLTest(T_QT73),"OK"); + execYAMLTest(T_QT73); } TEST_F(FromYAMLTest, T_R4YG) { - ASSERT_EQ(execYAMLTest(T_R4YG),"OK"); + execYAMLTest(T_R4YG); } TEST_F(FromYAMLTest, T_R52L) { - ASSERT_EQ(execYAMLTest(T_R52L),"OK"); + execYAMLTest(T_R52L); } TEST_F(FromYAMLTest, T_RHX7) { - ASSERT_EQ(execYAMLTest(T_RHX7),"OK"); + execYAMLTest(T_RHX7); } TEST_F(FromYAMLTest, T_RLU9) { - ASSERT_EQ(execYAMLTest(T_RLU9),"OK"); + execYAMLTest(T_RLU9); } TEST_F(FromYAMLTest, T_RR7F) { - ASSERT_EQ(execYAMLTest(T_RR7F),"OK"); + execYAMLTest(T_RR7F); } TEST_F(FromYAMLTest, T_RTP8) { - ASSERT_EQ(execYAMLTest(T_RTP8),"OK"); + execYAMLTest(T_RTP8); } TEST_F(FromYAMLTest, T_RXY3) { - ASSERT_EQ(execYAMLTest(T_RXY3),"OK"); + GTEST_SKIP() << "Reason: Invalid yaml is parsed successfully"; + execYAMLTest(T_RXY3); } TEST_F(FromYAMLTest, T_RZP5) { - ASSERT_EQ(execYAMLTest(T_RZP5),"OK"); + execYAMLTest(T_RZP5); } TEST_F(FromYAMLTest, T_RZT7) { - ASSERT_EQ(execYAMLTest(T_RZT7),"OK"); + execYAMLTest(T_RZT7); } TEST_F(FromYAMLTest, T_S3PD) { - ASSERT_EQ(execYAMLTest(T_S3PD),"OK"); + execYAMLTest(T_S3PD); } TEST_F(FromYAMLTest, T_S4GJ) { - ASSERT_EQ(execYAMLTest(T_S4GJ),"OK"); + GTEST_SKIP() << "Reason: Invalid yaml is parsed successfully"; + execYAMLTest(T_S4GJ); } TEST_F(FromYAMLTest, T_S4JQ) { - ASSERT_EQ(execYAMLTest(T_S4JQ),"OK"); + execYAMLTest(T_S4JQ); } TEST_F(FromYAMLTest, T_S4T7) { - ASSERT_EQ(execYAMLTest(T_S4T7),"OK"); + execYAMLTest(T_S4T7); } TEST_F(FromYAMLTest, T_S7BG) { - ASSERT_EQ(execYAMLTest(T_S7BG),"OK"); + execYAMLTest(T_S7BG); } TEST_F(FromYAMLTest, T_S98Z) { - ASSERT_EQ(execYAMLTest(T_S98Z),"OK"); + GTEST_SKIP() << "Reason: Invalid yaml is parsed successfully"; + execYAMLTest(T_S98Z); } TEST_F(FromYAMLTest, T_S9E8) { - ASSERT_EQ(execYAMLTest(T_S9E8),"OK"); + execYAMLTest(T_S9E8); } TEST_F(FromYAMLTest, T_SBG9) { - ASSERT_EQ(execYAMLTest(T_SBG9),"OK"); + execYAMLTest(T_SBG9); } TEST_F(FromYAMLTest, T_SF5V) { - ASSERT_EQ(execYAMLTest(T_SF5V),"OK"); + execYAMLTest(T_SF5V); } TEST_F(FromYAMLTest, T_SKE5) { - ASSERT_EQ(execYAMLTest(T_SKE5),"OK"); + execYAMLTest(T_SKE5); } TEST_F(FromYAMLTest, T_SM9W) { - ASSERT_EQ(execYAMLTest(T_SM9W),"OK"); + execYAMLTest(T_SM9W); } TEST_F(FromYAMLTest, T_SR86) { - ASSERT_EQ(execYAMLTest(T_SR86),"OK"); + execYAMLTest(T_SR86); } TEST_F(FromYAMLTest, T_SSW6) { - ASSERT_EQ(execYAMLTest(T_SSW6),"OK"); + execYAMLTest(T_SSW6); } TEST_F(FromYAMLTest, T_SU5Z) { - ASSERT_EQ(execYAMLTest(T_SU5Z),"OK"); + execYAMLTest(T_SU5Z); } TEST_F(FromYAMLTest, T_SU74) { - ASSERT_EQ(execYAMLTest(T_SU74),"OK"); + execYAMLTest(T_SU74); } TEST_F(FromYAMLTest, T_SY6V) { - ASSERT_EQ(execYAMLTest(T_SY6V),"OK"); + GTEST_SKIP() << "Reason: Invalid yaml is parsed successfully"; + execYAMLTest(T_SY6V); } TEST_F(FromYAMLTest, T_SYW4) { - ASSERT_EQ(execYAMLTest(T_SYW4),"OK"); + execYAMLTest(T_SYW4); } TEST_F(FromYAMLTest, T_T26H) { - ASSERT_EQ(execYAMLTest(T_T26H),"OK"); + execYAMLTest(T_T26H); } TEST_F(FromYAMLTest, T_T4YY) { - ASSERT_EQ(execYAMLTest(T_T4YY),"OK"); + execYAMLTest(T_T4YY); } TEST_F(FromYAMLTest, T_T5N4) { - ASSERT_EQ(execYAMLTest(T_T5N4),"OK"); + execYAMLTest(T_T5N4); } TEST_F(FromYAMLTest, T_T833) { - ASSERT_EQ(execYAMLTest(T_T833),"OK"); + execYAMLTest(T_T833); } TEST_F(FromYAMLTest, T_TD5N) { - ASSERT_EQ(execYAMLTest(T_TD5N),"OK"); + execYAMLTest(T_TD5N); } TEST_F(FromYAMLTest, T_TE2A) { - ASSERT_EQ(execYAMLTest(T_TE2A),"OK"); + execYAMLTest(T_TE2A); } TEST_F(FromYAMLTest, T_TL85) { - ASSERT_EQ(execYAMLTest(T_TL85),"OK"); + execYAMLTest(T_TL85); } TEST_F(FromYAMLTest, T_TS54) { - ASSERT_EQ(execYAMLTest(T_TS54),"OK"); + execYAMLTest(T_TS54); } TEST_F(FromYAMLTest, T_U3C3) { - ASSERT_EQ(execYAMLTest(T_U3C3),"OK"); + execYAMLTest(T_U3C3); } TEST_F(FromYAMLTest, T_U3XV) { - ASSERT_EQ(execYAMLTest(T_U3XV),"OK"); + execYAMLTest(T_U3XV); } TEST_F(FromYAMLTest, T_U44R) { - ASSERT_EQ(execYAMLTest(T_U44R),"OK"); + execYAMLTest(T_U44R); } TEST_F(FromYAMLTest, T_U99R) { - ASSERT_EQ(execYAMLTest(T_U99R),"OK"); + execYAMLTest(T_U99R); } TEST_F(FromYAMLTest, T_U9NS) { - ASSERT_EQ(execYAMLTest(T_U9NS),"OK"); + execYAMLTest(T_U9NS); } TEST_F(FromYAMLTest, T_UDM2) { - ASSERT_EQ(execYAMLTest(T_UDM2),"OK"); + execYAMLTest(T_UDM2); } TEST_F(FromYAMLTest, T_UDR7) { - ASSERT_EQ(execYAMLTest(T_UDR7),"OK"); + execYAMLTest(T_UDR7); } TEST_F(FromYAMLTest, T_UGM3) { - ASSERT_EQ(execYAMLTest(T_UGM3),"OK"); + execYAMLTest(T_UGM3); } TEST_F(FromYAMLTest, T_UKK6) { - ASSERT_EQ(execYAMLTest(T_UKK6),"OK"); + execYAMLTest(T_UKK6); } TEST_F(FromYAMLTest, T_UT92) { - ASSERT_EQ(execYAMLTest(T_UT92),"OK"); + execYAMLTest(T_UT92); } TEST_F(FromYAMLTest, T_UV7Q) { - ASSERT_EQ(execYAMLTest(T_UV7Q),"OK"); + execYAMLTest(T_UV7Q); } TEST_F(FromYAMLTest, T_V55R) { - ASSERT_EQ(execYAMLTest(T_V55R),"OK"); + execYAMLTest(T_V55R); } TEST_F(FromYAMLTest, T_V9D5) { - ASSERT_EQ(execYAMLTest(T_V9D5),"OK"); + execYAMLTest(T_V9D5); } TEST_F(FromYAMLTest, T_VJP3) { - ASSERT_EQ(execYAMLTest(T_VJP3),"OK"); + GTEST_SKIP() << "Reason: Invalid yaml is parsed successfully"; + execYAMLTest(T_VJP3); } TEST_F(FromYAMLTest, T_W42U) { - ASSERT_EQ(execYAMLTest(T_W42U),"OK"); + execYAMLTest(T_W42U); } TEST_F(FromYAMLTest, T_W4TN) { - ASSERT_EQ(execYAMLTest(T_W4TN),"OK"); + execYAMLTest(T_W4TN); } TEST_F(FromYAMLTest, T_W5VH) { - ASSERT_EQ(execYAMLTest(T_W5VH),"OK"); + execYAMLTest(T_W5VH); } TEST_F(FromYAMLTest, T_W9L4) { - ASSERT_EQ(execYAMLTest(T_W9L4),"OK"); + execYAMLTest(T_W9L4); } TEST_F(FromYAMLTest, T_WZ62) { - ASSERT_EQ(execYAMLTest(T_WZ62),"OK"); + execYAMLTest(T_WZ62); } TEST_F(FromYAMLTest, T_X38W) { - ASSERT_EQ(execYAMLTest(T_X38W),"OK"); + execYAMLTest(T_X38W); } TEST_F(FromYAMLTest, T_X4QW) { - ASSERT_EQ(execYAMLTest(T_X4QW),"OK"); + GTEST_SKIP() << "Reason: Invalid yaml is parsed successfully"; + execYAMLTest(T_X4QW); } TEST_F(FromYAMLTest, T_X8DW) { - ASSERT_EQ(execYAMLTest(T_X8DW),"OK"); + execYAMLTest(T_X8DW); } TEST_F(FromYAMLTest, T_XLQ9) { - ASSERT_EQ(execYAMLTest(T_XLQ9),"OK"); + execYAMLTest(T_XLQ9); } TEST_F(FromYAMLTest, T_XV9V) { - ASSERT_EQ(execYAMLTest(T_XV9V),"OK"); + execYAMLTest(T_XV9V); } TEST_F(FromYAMLTest, T_XW4D) { - ASSERT_EQ(execYAMLTest(T_XW4D),"OK"); + execYAMLTest(T_XW4D); } TEST_F(FromYAMLTest, T_Y2GN) { - ASSERT_EQ(execYAMLTest(T_Y2GN),"OK"); + execYAMLTest(T_Y2GN); } TEST_F(FromYAMLTest, T_Y79Y) { - ASSERT_EQ(execYAMLTest(T_Y79Y),"OK"); + GTEST_SKIP() << "Reason: Invalid yaml is parsed successfully"; + execYAMLTest(T_Y79Y); } TEST_F(FromYAMLTest, T_YD5X) { - ASSERT_EQ(execYAMLTest(T_YD5X),"OK"); + execYAMLTest(T_YD5X); } TEST_F(FromYAMLTest, T_YJV2) { - ASSERT_EQ(execYAMLTest(T_YJV2),"OK"); + GTEST_SKIP() << "Reason: Invalid yaml is parsed successfully"; + execYAMLTest(T_YJV2); } TEST_F(FromYAMLTest, T_Z67P) { - ASSERT_EQ(execYAMLTest(T_Z67P),"OK"); + execYAMLTest(T_Z67P); } TEST_F(FromYAMLTest, T_Z9M4) { - ASSERT_EQ(execYAMLTest(T_Z9M4),"OK"); + execYAMLTest(T_Z9M4); } TEST_F(FromYAMLTest, T_ZCZ6) { - ASSERT_EQ(execYAMLTest(T_ZCZ6),"OK"); + GTEST_SKIP() << "Reason: Invalid yaml is parsed successfully"; + execYAMLTest(T_ZCZ6); } TEST_F(FromYAMLTest, T_ZF4X) { - ASSERT_EQ(execYAMLTest(T_ZF4X),"OK"); + execYAMLTest(T_ZF4X); } TEST_F(FromYAMLTest, T_ZH7C) { - ASSERT_EQ(execYAMLTest(T_ZH7C),"OK"); + execYAMLTest(T_ZH7C); } TEST_F(FromYAMLTest, T_ZK9H) { - ASSERT_EQ(execYAMLTest(T_ZK9H),"OK"); + execYAMLTest(T_ZK9H); } TEST_F(FromYAMLTest, T_ZL4Z) { - ASSERT_EQ(execYAMLTest(T_ZL4Z),"OK"); + GTEST_SKIP() << "Reason: Invalid yaml is parsed successfully"; + execYAMLTest(T_ZL4Z); } TEST_F(FromYAMLTest, T_ZVH3) { - ASSERT_EQ(execYAMLTest(T_ZVH3),"OK"); + execYAMLTest(T_ZVH3); } TEST_F(FromYAMLTest, T_ZWK4) { - ASSERT_EQ(execYAMLTest(T_ZWK4),"OK"); + execYAMLTest(T_ZWK4); } TEST_F(FromYAMLTest, T_ZXT5) { - ASSERT_EQ(execYAMLTest(T_ZXT5),"OK"); + GTEST_SKIP() << "Reason: Invalid yaml is parsed successfully"; + execYAMLTest(T_ZXT5); } + /** This test is ignored because these tests are not required to fail and rapidyaml ignores the YAML version string. TEST_F(FromYAMLTest, T_ZYU8) { - ASSERT_EQ(execYAMLTest(T_ZYU8),"OK"); + execYAMLTest(T_ZYU8); } + */ } /* namespace nix */ diff --git a/src/libexpr/tests/yaml.cc b/src/libexpr/tests/yaml.cc index 259c3efdde1..dde7b2401d8 100644 --- a/src/libexpr/tests/yaml.cc +++ b/src/libexpr/tests/yaml.cc @@ -1,6 +1,7 @@ #ifdef HAVE_RYML #include "libexpr.hh" +#include "primops.hh" // Ugly, however direct access to the SAX parser is required in order to parse multiple JSON objects from a stream #include "json-to-value.cc" @@ -9,6 +10,7 @@ namespace nix { // Testing the conversion from YAML + /* replacement of non-ascii unicode characters, which indicate the presence of certain characters that would be otherwise hard to read */ static std::string replaceUnicodePlaceholders(std::string_view str) { constexpr std::string_view eop("\xe2\x88\x8e"); constexpr std::string_view filler{"\xe2\x80\x94"}; @@ -91,17 +93,24 @@ namespace nix { class FromYAMLTest : public LibExprTest { protected: - std::string execYAMLTest(std::string_view test) { - const PrimOpFun fromYAML = state.getBuiltin("fromYAML").primOp->fun; + void execYAMLTest(std::string_view test) { + //const PrimOpFun fromYAML = state.getBuiltin("fromYAML").primOp->fun; + PrimOpFun fromYAML = nullptr; + for (const auto & primOp : *RegisterPrimOp::primOps) { + if (primOp.name == "__fromYAML") { + fromYAML = primOp.fun; + } + } + EXPECT_FALSE(fromYAML == nullptr) << "The experimental feature \"fromYAML\" is not available"; Value testCases, testVal; Value *pTestVal = &testVal; testVal.mkString(test); fromYAML(state, noPos, &pTestVal, testCases); - int ctr = -1; + size_t ctr = 0; + std::string_view testName; + Value *json = nullptr; for (auto testCase : testCases.listItems()) { - Value *json = nullptr; bool fail = false; - ctr++; std::string_view yamlRaw; for (auto attr = testCase->attrs->begin(); attr != testCase->attrs->end(); attr++) { auto name = state.symbols[attr->name]; @@ -111,44 +120,47 @@ namespace nix { yamlRaw = state.forceStringNoCtx(*attr->value, noPos, "while interpreting the \"yaml\" field as string"); } else if (name == "fail") { fail = state.forceBool(*attr->value, noPos, "while interpreting the \"fail\" field as bool"); + } else if (name == "name") { + testName = state.forceStringNoCtx(*attr->value, noPos, "while interpreting the \"name\" field as string"); } } - fail |= !json; - bool emptyJSON = false; - std::string_view jsonStr; + // extract expected result Value jsonVal; + bool nullJSON = json && json->type() == nNull; + bool emptyJSON = !nullJSON; + if (json && !nullJSON) { + std::string_view jsonStr = state.forceStringNoCtx(*json, noPos, "while interpreting the \"json\" field as string"); + emptyJSON = jsonStr.empty(); + if (!emptyJSON) { + jsonVal = parseJSONStream(state, jsonStr, fromYAML); + jsonStr = printValue(state, jsonVal); + } + } + // extract the YAML to be parsed std::string yamlStr = replaceUnicodePlaceholders(yamlRaw); Value yaml, yamlVal; Value *pYaml = &yaml; yaml.mkString(yamlStr); if (!fail) { - if (json->type() == nNull) { - jsonStr = "null"; - jsonVal.mkNull(); + if (emptyJSON) { + EXPECT_THROW( + fromYAML(state, noPos, &pYaml, yamlVal), + EvalError) << "Testcase #" << ctr << ": Expected empty YAML, which should throw an exception, parsed \"" << printValue(state, yamlVal) << "\":\n" << yamlRaw; } else { - jsonStr = state.forceStringNoCtx(*json, noPos, "while interpreting the \"json\" field as string"); - } - if (!(emptyJSON = jsonStr.empty())) { - if (json->type() != nNull) { - jsonVal = parseJSONStream(state, jsonStr, fromYAML); - jsonStr = printValue(state, jsonVal); - } fromYAML(state, noPos, &pYaml, yamlVal); - EXPECT_EQ(printValue(state, yamlVal), printValue(state, jsonVal)) << "Testcase[" + std::to_string(ctr) + "]: Parsed YAML does not match expected JSON result"; - } - } - if (fail || emptyJSON) { - try { - fromYAML(state, noPos, &pYaml, yamlVal); // should throw exception, if fail is asserted, and has to throw, if emptyJSON is asserted - } catch (const EvalError &e) { - continue; + if (nullJSON) { + EXPECT_TRUE(yamlVal.type() == nNull) << "Testcase #" << ctr << ": Expected null YAML:\n" << yamlStr; + } else { + EXPECT_EQ(printValue(state, yamlVal), printValue(state, jsonVal)) << "Testcase #" << ctr << ": Parsed YAML does not match expected JSON result:\n" << yamlRaw; + } } + } else { + EXPECT_THROW( + fromYAML(state, noPos, &pYaml, yamlVal), + EvalError) << "Testcase #" << ctr << " (" << testName << "): Parsing YAML has to throw an exception, but \"" << printValue(state, yamlVal) << "\" was parsed:\n" << yamlRaw; } - EXPECT_FALSE(emptyJSON) << "Testcase[" + std::to_string(ctr) + "]: Parsing empty YAML has to fail"; - // ryml parses some invalid YAML successfully - // EXPECT_FALSE(fail) << "Testcase[" << ctr << "]: Invalid YAML was parsed successfully"; + ctr++; } - return "OK"; } };