mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-06 10:44:41 +01:00
Test for id overflow and string deduplication in SharedValueStores (#3319)
Follow-on to #3311
This commit is contained in:
@@ -66,6 +66,10 @@ TEST(ValueStore, String) {
|
||||
EXPECT_THAT(a_id, Not(Eq(b_id)));
|
||||
EXPECT_THAT(value_stores.strings().Get(a_id), Eq(a));
|
||||
EXPECT_THAT(value_stores.strings().Get(b_id), Eq(b));
|
||||
|
||||
// Adding the same string again should return the same id.
|
||||
EXPECT_THAT(value_stores.strings().Add(a), Eq(a_id));
|
||||
EXPECT_THAT(value_stores.strings().Add(b), Eq(b_id));
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
Reference in New Issue
Block a user