From 1e0f1119e294e795a8f55c2e065d74755ca96b7f Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Wed, 14 Sep 2016 16:43:53 -0500 Subject: [PATCH] testTypeCast: mangle values to be printable print (u)int8 as integer instead of character (cherry picked from commit da8ba56dd1cd87c532b5fa625644151b655005fe) --- 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 " - < (" + < (" < (" + < (" <