From: Justin Viiret Date: Fri, 11 Aug 2017 00:35:19 +0000 (+1000) Subject: unit: add PrintTo for ue2_literal X-Git-Tag: v4.6.0^2~25 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3f36665e390f2014449be470f11865736fbfc7d2;p=thirdparty%2Fvectorscan.git unit: add PrintTo for ue2_literal --- diff --git a/unit/internal/util_string.cpp b/unit/internal/util_string.cpp index d6f7285a..f501f66b 100644 --- a/unit/internal/util_string.cpp +++ b/unit/internal/util_string.cpp @@ -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: @@ -34,6 +34,18 @@ 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",