3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-09-14 05:31:29 +00:00

Make Const::as_string work without reducing packed bits to vector<State>

This commit is contained in:
Robert O'Callahan 2025-08-29 04:40:22 +00:00
parent 652190bd50
commit a57b7dfd2e
2 changed files with 16 additions and 10 deletions

View file

@ -124,6 +124,13 @@ namespace RTLIL {
EXPECT_TRUE(c.as_bool());
EXPECT_TRUE(c.is_str());
}
{
Const c(0x2, 8);
EXPECT_TRUE(c.is_str());
EXPECT_EQ(c.as_string(), "00000010");
EXPECT_TRUE(c.is_str());
}
}
TEST_F(KernelRtlilTest, ConstConstIteratorWorks) {