Parcourir la source

[2571] Explain unit test for character 255.

Shane Kerr il y a 12 ans
Parent
commit
f65147ed98
1 fichiers modifiés avec 3 ajouts et 0 suppressions
  1. 3 0
      src/lib/cc/tests/data_unittests.cc

+ 3 - 0
src/lib/cc/tests/data_unittests.cc

@@ -91,6 +91,9 @@ TEST(Element, from_and_to_json) {
     sv.push_back("-1");
     sv.push_back("-1.234");
     sv.push_back("-123.456");
+    // We should confirm that our string handling is 8-bit clean.
+    // At one point we were using char-length data and comparing to EOF,
+    // which means that character '\xFF' would not parse properly.
     sv.push_back("\"\xFF\"");
 
     BOOST_FOREACH(const std::string& s, sv) {