From 3f36665e390f2014449be470f11865736fbfc7d2 Mon Sep 17 00:00:00 2001 From: Justin Viiret Date: Fri, 11 Aug 2017 10:35:19 +1000 Subject: [PATCH] unit: add PrintTo for ue2_literal --- unit/internal/util_string.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) 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",