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:
parent
447a6cb3f0
commit
c8404bf86b
4 changed files with 62 additions and 18 deletions
|
@ -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.")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue