summaryrefslogtreecommitdiffstats
path: root/tests.sh
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2019-03-20 18:29:16 -0400
committerTavian Barnes <tavianator@tavianator.com>2019-03-20 18:29:16 -0400
commit344f9c2f844b20a8ba206595c28429a196383e23 (patch)
tree03981ef52bab3196c43fbc87e30549cf19f5eb68 /tests.sh
parent2e10b1d55bccbbe3de811df91a70772978e76abf (diff)
downloadbfs-344f9c2f844b20a8ba206595c28429a196383e23.tar.xz
opt: Replace -a -false/-o -true with -not when possible
Diffstat (limited to 'tests.sh')
-rwxr-xr-xtests.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests.sh b/tests.sh
index 2df3448..a219812 100755
--- a/tests.sh
+++ b/tests.sh
@@ -609,6 +609,7 @@ gnu_tests=(
test_and_purity
test_not_reachability
test_comma_reachability
+ test_and_false_or_true
)
bfs_tests=(
@@ -2003,6 +2004,12 @@ function test_de_morgan_or() {
bfs_diff basic \( \! -name 'foo' -o \! -type f \)
}
+function test_and_false_or_true() {
+ # Test (-a lhs(always_true) false) <==> (! lhs),
+ # (-a lhs(always_false) true) <==> (! lhs)
+ bfs_diff basic -prune -false -o -true
+}
+
function test_data_flow_depth() {
bfs_diff basic -depth +1 -depth -4
}