]> git.ipfire.org Git - thirdparty/vectorscan.git/commitdiff
Unbreak unit-internal for builds w/o dump support
authorJustin Viiret <justin.viiret@intel.com>
Tue, 20 Oct 2015 02:24:23 +0000 (13:24 +1100)
committerMatthew Barr <matthew.barr@intel.com>
Fri, 30 Oct 2015 00:28:37 +0000 (11:28 +1100)
Use printable, rather than escapeString.

unit/internal/utf8_validate.cpp

index 8335836108d3990cd0229d970346af01cc60623c..6649e6fe9924474384d310e037964d51654f999d 100644 (file)
@@ -31,7 +31,7 @@
 #include "parser/utf8_validate.h"
 
 #include "ue2common.h"
-#include "util/ue2string.h"
+#include "util/string_util.h"
 
 #include "gtest/gtest.h"
 
@@ -46,7 +46,7 @@ struct ValidUtf8TestInfo {
 // Helper for gtest.
 static
 void PrintTo(const ValidUtf8TestInfo &t, ::std::ostream *os) {
-    *os << "(" << t.str << ", " << t.is_valid << ")";
+    *os << "(\"" << printable(t.str) << "\", " << t.is_valid << ")";
 }
 
 static ValidUtf8TestInfo valid_utf8_tests[] = {
@@ -118,5 +118,5 @@ INSTANTIATE_TEST_CASE_P(ValidUtf8, ValidUtf8Test, ValuesIn(valid_utf8_tests));
 TEST_P(ValidUtf8Test, check) {
     const auto &info = GetParam();
     ASSERT_EQ(info.is_valid, isValidUtf8(info.str.c_str()))
-        << "String is: " << escapeString(info.str) << std::endl;
+        << "String is: " << printable(info.str) << std::endl;
 }