From a254e112862317af77fa657aa02f3d1343fde38b Mon Sep 17 00:00:00 2001 From: Alek Mosingiewicz Date: Mon, 13 Aug 2018 17:57:38 +0200 Subject: [PATCH] Make information on source and target types in Type Conversion Exception public. --- unittests/compiled_tests.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/unittests/compiled_tests.cpp b/unittests/compiled_tests.cpp index f6141b09..b05fdb2e 100644 --- a/unittests/compiled_tests.cpp +++ b/unittests/compiled_tests.cpp @@ -1354,7 +1354,7 @@ TEST_CASE("Test ability to get 'use' function from default construction") const auto use_function = chai.eval>("use"); } -TEST_CASE("Throw an exception when trying to add one conversion twice") +TEST_CASE("Throw an exception when trying to add same conversion twice") { struct my_int { int value; @@ -1363,11 +1363,11 @@ TEST_CASE("Throw an exception when trying to add one conversion twice") chaiscript::ChaiScript chai; chai.add(chaiscript::type_conversion([](int x) { - std::cout << "Foo type conversion 1\n"; + std::cout << "My_int type conversion 1\n"; return my_int(x); })); CHECK_THROWS_AS(chai.add(chaiscript::type_conversion([](int x) { - std::cout << "Foo type conversion 2\n"; + std::cout << "My_int type conversion 2\n"; return my_int(x); })), chaiscript::exception::conversion_error);