From 997cb30f1fe2c14a16463a9e3bad969dd89a52b6 Mon Sep 17 00:00:00 2001 From: "Emil J. Tywoniak" Date: Tue, 1 Oct 2024 13:25:07 +0200 Subject: [PATCH] cxxrtl: test stream operator --- tests/cxxrtl/test_value.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/cxxrtl/test_value.cc b/tests/cxxrtl/test_value.cc index 0750d412e..b6fe3cf4a 100644 --- a/tests/cxxrtl/test_value.cc +++ b/tests/cxxrtl/test_value.cc @@ -49,4 +49,12 @@ int main() cxxrtl::value<1> sel(0u); assert(val.template bmux<4>(sel).get() == 0xfu); } + + { + // stream operator smoke test + cxxrtl::value<8> val(0x1fu); + std::ostringstream oss; + oss << val; + assert(oss.str() == "8'1f"); + } }