Parcourir la source

[5017] Split slash unicode into separate test.

Tomek Mrugalski il y a 8 ans
Parent
commit
5602d52999
1 fichiers modifiés avec 5 ajouts et 1 suppressions
  1. 5 1
      src/bin/dhcp4/tests/parser_unittest.cc

+ 5 - 1
src/bin/dhcp4/tests/parser_unittest.cc

@@ -500,9 +500,13 @@ TEST(ParserTest, unicodeEscapes) {
         ASSERT_EQ(Element::string, result->getType());
         ASSERT_EQ(Element::string, result->getType());
         EXPECT_EQ(ins, result->stringValue());
         EXPECT_EQ(ins, result->stringValue());
     }
     }
+}
 
 
+// This test checks that all represenations of a slash is recognized properly.
+TEST(ParserTest, unicodeSlash) {
     // check the 4 possible encodings of solidus '/'
     // check the 4 possible encodings of solidus '/'
-    json = "\"/\\/\\u002f\\u002F\"";
+    ConstElementPtr result;
+    string json = "\"/\\/\\u002f\\u002F\"";
     ASSERT_NO_THROW(
     ASSERT_NO_THROW(
     try {
     try {
         Parser4Context ctx;
         Parser4Context ctx;