From da8ba56dd1cd87c532b5fa625644151b655005fe Mon Sep 17 00:00:00 2001 From: Michael Davidsaver Date: Wed, 7 Sep 2016 15:29:58 -0400 Subject: [PATCH] testTypeCast: mangle values to be printable print (u)int8 as integer instead of character --- testApp/misc/testTypeCast.cpp | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/testApp/misc/testTypeCast.cpp b/testApp/misc/testTypeCast.cpp index 1f2516e..03cdb43 100644 --- a/testApp/misc/testTypeCast.cpp +++ b/testApp/misc/testTypeCast.cpp @@ -29,6 +29,13 @@ using std::string; namespace { + // Mangle value to be printable as per print_convolute<> + template + inline + typename epics::pvData::detail::print_convolute::return_t + print(T v) { + return epics::pvData::detail::print_convolute::op(v); + } template struct testequal { @@ -54,24 +61,24 @@ namespace { //actual = ::epics::pvData::detail::cast_helper::op(inp); } catch(std::runtime_error& e) { msg<<"Failed to cast " - < " - < " + <::op(actual, expect)) { msg<<"Failed cast gives unexpected value " - < " - < " + < " - < " + <(inp); msg<<"Failed to generate expected error " - < (" + < (" < (" + < (" <