diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2018-08-18 12:23:41 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2018-08-18 12:23:41 -0400 |
commit | 5529a7006ae22df4ea69e06121bd0111fa52e45c (patch) | |
tree | b6d77b6a7998ee93e88646fbcf801083a90ce740 /tests.sh | |
parent | 94740c610143ac26a2c0fa11998db8f0cb76af1a (diff) | |
download | bfs-5529a7006ae22df4ea69e06121bd0111fa52e45c.tar.xz |
opt: Re-run optimizations after reordering expressions
This catches new data flow inferences that can be made after swapping
the children of an expression.
Diffstat (limited to 'tests.sh')
-rwxr-xr-x | tests.sh | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -227,11 +227,14 @@ posix_tests=( test_a test_o test_deep + test_or_purity test_double_negation test_de_morgan_not test_de_morgan_and test_de_morgan_or test_data_flow_type + test_data_flow_and_swap + test_data_flow_or_swap ) bsd_tests=( @@ -410,7 +413,6 @@ gnu_tests=( test_comma test_precedence test_and_purity - test_or_purity test_not_reachability test_comma_reachability test_print_error @@ -1589,6 +1591,14 @@ function test_data_flow_type() { bfs_diff basic \! \( -type f -o \! -type f \) } +function test_data_flow_and_swap() { + bfs_diff basic \! -type f -a -type d +} + +function test_data_flow_or_swap() { + bfs_diff basic \! \( -type f -o -not -type d \) +} + function test_print_error() { if [ -e /dev/full ]; then ! invoke_bfs basic -maxdepth 0 >/dev/full 2>/dev/null |