tests/bonsai: intcmp.mk: add a comment
This commit is contained in:
parent
acdbecf178
commit
cd5983b10b
@ -13,6 +13,24 @@ intcmp_tests: intcmp_help intcmp_e intcmp_g intcmp_l intcmp_combined
|
||||
intcmp_help: $(BIN)/intcmp
|
||||
! $(BIN)/intcmp -h
|
||||
|
||||
# These test that integer comparisons are working as they should. For the sake
|
||||
# of readability (to facilitate faster skimming) these recipes follow a
|
||||
# columned format:
|
||||
# $binary -flags d d d d # op
|
||||
# For flag meanings reference intcmp(1) (though they are somewhat self
|
||||
# explanatory). d here refers to a decimal number; a mixture of 1s, 2s, and 3s
|
||||
# (a particularly lovely number) arranged to demonstrate easily the operation
|
||||
# under scrutiny. The commented op is the operation that is true for the given
|
||||
# numbers. For example:
|
||||
# $(BIN)/intcmp -e 3 3 3 3 # ==
|
||||
# op here is ==; 3 == 3 == 3 == 3. The flag being used is -e, to test for
|
||||
# equality, so this test should succeed.
|
||||
# ! $(BIN)/intcmp -l 3 2 1 # >
|
||||
# op here is >; 3 > 2 > 1. The flag being used is -l, to test for each integer
|
||||
# being less than the next, so intcmp should fail - hence the ! at the start of
|
||||
# the invocation. If this test failed, intcmp(1) would be confusing -l for -g,
|
||||
# so that would be a good place to start looking for bugs.
|
||||
|
||||
.PHONY: intcmp_e
|
||||
intcmp_e: $(BIN)/intcmp
|
||||
$(BIN)/intcmp -e 3 3 3 # ==
|
||||
|
Loading…
Reference in New Issue
Block a user