From 91de98cea3025ca3e2a65d4298f910ab0e1d8f6d Mon Sep 17 00:00:00 2001 From: DTB Date: Fri, 2 Aug 2024 18:28:24 -0600 Subject: [PATCH] tests: bonsai/intcmp.mk: make tests more relevant to failure cases --- tests/bonsai/intcmp.mk | 39 ++++++++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/tests/bonsai/intcmp.mk b/tests/bonsai/intcmp.mk index 53f4282..57afae0 100755 --- a/tests/bonsai/intcmp.mk +++ b/tests/bonsai/intcmp.mk @@ -7,30 +7,39 @@ # notice are preserved. This file is offered as-is, without any warranty. .PHONY: intcmp_tests -intcmp_tests: intcmp_e intcmp_g intcmp_l +intcmp_tests: intcmp_help intcmp_e intcmp_g intcmp_l intcmp_combined + +.PHONY: intcmp_help +intcmp_help: $(BIN)/intcmp + ! $(BIN)/intcmp -h .PHONY: intcmp_e intcmp_e: $(BIN)/intcmp - $(BIN)/intcmp -e 3 3 3 - ! $(BIN)/intcmp -e 1 2 3 + $(BIN)/intcmp -e 3 3 3 # == + ! $(BIN)/intcmp -e 1 2 3 # < + ! $(BIN)/intcmp -e 3 2 1 # > .PHONY: intcmp_g intcmp_g: $(BIN)/intcmp - $(BIN)/intcmp -g 3 2 1 - ! $(BIN)/intcmp -g 1 3 3 - $(BIN)/intcmp -ge 3 3 1 - ! $(BIN)/intcmp -ge 1 2 3 + $(BIN)/intcmp -g 3 2 1 # > + ! $(BIN)/intcmp -g 3 3 3 # == + ! $(BIN)/intcmp -g 1 2 3 # < + $(BIN)/intcmp -ge 3 3 1 # >= + ! $(BIN)/intcmp -ge 1 2 3 # < .PHONY: intcmp_l intcmp_l: $(BIN)/intcmp - $(BIN)/intcmp -l 1 2 3 - ! $(BIN)/intcmp -l 3 3 1 - $(BIN)/intcmp -le 1 3 3 - ! $(BIN)/intcmp -le 3 2 1 + $(BIN)/intcmp -l 1 2 3 # < + ! $(BIN)/intcmp -l 3 3 3 # == + ! $(BIN)/intcmp -l 3 2 1 # > + $(BIN)/intcmp -le 1 3 3 # <= + ! $(BIN)/intcmp -le 3 2 1 # > .PHONY: intcmp_combined intcmp_combined: $(BIN)/intcmp - $(BINARY) -gl 1 2 3 - ! $(BINARY) -gl 3 3 3 - $(BINARY) -egl 3 1 1 2 - ! $(BINARY) -egl foo + $(BIN)/intcmp -gl 1 2 3 # < + $(BIN)/intcmp -gl 3 2 1 # > + $(BIN)/intcmp -gl 1 3 1 # != + ! $(BIN)/intcmp -gl 3 3 3 # == + $(BIN)/intcmp -egl 3 1 1 3 # >, ==, < + ! $(BIN)/intcmp -egl foo # huh?