diff options
Diffstat (limited to 'base/base_tests')
-rw-r--r-- | base/base_tests/newtype_test.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
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 |