3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-06 17:44:09 +00:00

Merge pull request #4624 from YosysHQ/emil/cxxrtl-smoke-test

cxxrtl: test stream operator
This commit is contained in:
Emil J 2024-10-09 05:57:13 -07:00 committed by GitHub
commit 038e262332
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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");
}
} }