diff options
Diffstat (limited to 'test/expression/simplifications.py')
| -rw-r--r-- | test/expression/simplifications.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/expression/simplifications.py b/test/expression/simplifications.py index b6d7e462..f4b4fcd6 100644 --- a/test/expression/simplifications.py +++ b/test/expression/simplifications.py @@ -12,6 +12,7 @@ b = ExprId('b') c = ExprId('c') d = ExprId('d') e = ExprId('e') +f = ExprId('f', size=64) m = ExprMem(a) s = a[:8] @@ -190,6 +191,13 @@ to_test = [(ExprInt32(1) - ExprInt32(1), ExprInt32(0)), (ExprCompose([(a, 0, 32), (b, 32, 64)]) << ExprInt64(0x10), ExprCompose([(ExprInt16(0), 0, 16), (a, 16, 48), (b[:16], 48, 64)])), + (ExprCompose([(a, 0, 32), (b, 32, 64)]) | ExprCompose([(c, 0, 32), (d, 32, 64)]), + ExprCompose([(a|c, 0, 32), (b|d, 32, 64)])), + (ExprCompose([(a, 0, 32), (ExprInt32(0), 32, 64)]) | ExprCompose([(ExprInt32(0), 0, 32), (d, 32, 64)]), + ExprCompose([(a, 0, 32), (d, 32, 64)])), + (ExprCompose([(f[:32], 0, 32), (ExprInt32(0), 32, 64)]) | ExprCompose([(ExprInt32(0), 0, 32), (f[32:], 32, 64)]), + f), + ] for e, e_check in to_test[:]: |