cxxrtl: test stream operator

This commit is contained in:
Emil J. Tywoniak 2024-10-01 13:25:07 +02:00
parent 1bf908dea8
commit 997cb30f1f
1 changed files with 8 additions and 0 deletions

View File

@ -49,4 +49,12 @@ int main()
cxxrtl::value<1> sel(0u); cxxrtl::value<1> sel(0u);
assert(val.template bmux<4>(sel).get<uint64_t>() == 0xfu); assert(val.template bmux<4>(sel).get<uint64_t>() == 0xfu);
} }
{
// stream operator smoke test
cxxrtl::value<8> val(0x1fu);
std::ostringstream oss;
oss << val;
assert(oss.str() == "8'1f");
}
} }