From 1891313b03ff0c375f00ef3da674f2f925a0ae56 Mon Sep 17 00:00:00 2001 From: Sergey Magidovich Date: Tue, 23 Aug 2016 14:04:00 +0300 Subject: Add simple output. --- base/base_tests/newtype_test.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'base/base_tests/newtype_test.cpp') diff --git a/base/base_tests/newtype_test.cpp b/base/base_tests/newtype_test.cpp index 0a5741eb11..e912b557d1 100644 --- a/base/base_tests/newtype_test.cpp +++ b/base/base_tests/newtype_test.cpp @@ -96,4 +96,19 @@ UNIT_TEST(NewTypeMember_Operations) a ^= Int(7); TEST_EQUAL(a, Int(10 ^ 7), ()); } + +namespace test_output +{ +NEWTYPE_SIMPLE_OUTPUT(Int); +} // namespace test_output + +UNIT_TEST(NewType_SimpleOutPut) +{ + using namespace test_output; + TEST_EQUAL(test_output::DebugPrint(Int(10)), "10", ()); + + ostringstream sstr; + sstr << Int(20); + TEST_EQUAL(sstr.str(), "20", ()); +} } // namespace -- cgit v1.2.3