]> git.ipfire.org Git - thirdparty/vectorscan.git/commitdiff
unit: add PrintTo for ue2_literal
authorJustin Viiret <justin.viiret@intel.com>
Fri, 11 Aug 2017 00:35:19 +0000 (10:35 +1000)
committerMatthew Barr <matthew.barr@intel.com>
Mon, 18 Sep 2017 03:26:18 +0000 (13:26 +1000)
unit/internal/util_string.cpp

index d6f7285a2c0141f7a7b888d0b8364b4cd6fb7a5a..f501f66bd914c35dbe2a7738a52e453239d305ca 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Intel Corporation
+ * Copyright (c) 2015-2017, Intel Corporation
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:
 
 using namespace ue2;
 
+#if defined(DUMP_SUPPORT)
+
+namespace ue2 {
+
+static void PrintTo(const ue2_literal &lit, ::std::ostream *os) {
+    *os << dumpString(lit);
+}
+
+} // namespace ue2
+
+#endif // DUMP_SUPPORT
+
 TEST(string, case_iter1) {
     const char * const expected[] = {
         "3FOO-BAR",