3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-10-09 01:11:58 +00:00

pyosys/hashlib: equivalence operators

This commit is contained in:
Mohamed Gaber 2025-09-28 04:09:36 +03:00
parent 447a6cb3f0
commit c8404bf86b
No known key found for this signature in database
4 changed files with 62 additions and 18 deletions

View file

@ -33,10 +33,10 @@ for cls in [StringSet, StringPool]:
C |= {"A", "B", "C"}
D |= {"C", "D", "E"}
c_symdiff_d = (C ^ D)
assert (c_symdiff_d) == {"A", "B", "D", "E"}
assert c_symdiff_d == {"A", "B", "D", "E"} # compare against iterable
repr_test = eval(repr(c_symdiff_d))
c_symdiff_d == repr_test
assert c_symdiff_d == repr_test # compare against self
print("Done.")