From 6fd35a3fb86ef18018de7209789df2f0b4bac90b Mon Sep 17 00:00:00 2001 From: Adam Wulkiewicz Date: Wed, 18 Mar 2015 17:25:57 +0100 Subject: [PATCH] [test][util] Generate custom error message in select_most_precise test. --- test/util/select_most_precise.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/test/util/select_most_precise.cpp b/test/util/select_most_precise.cpp index 11b066fa3..ec93b5f25 100644 --- a/test/util/select_most_precise.cpp +++ b/test/util/select_most_precise.cpp @@ -24,8 +24,15 @@ template void test() { typedef typename bg::select_most_precise::type type; + bool is_same = boost::is_same::type::value; - BOOST_CHECK((boost::is_same::type::value)); + BOOST_CHECK_MESSAGE(is_same, + "The most precise of types " + "T1: {" << typeid(T1).name() << " | s: " << sizeof(T1) << "}" << + " and " + "T2: {" << typeid(T2).name() << " | s: " << sizeof(T2) << "}" << + " does not match " + "ExpectedType: {" << typeid(ExpectedType).name() << " | s: " << sizeof(ExpectedType) << "}"); } int test_main(int, char* [])