diff options
Diffstat (limited to 'testcases-cons')
-rw-r--r-- | testcases-cons | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/testcases-cons b/testcases-cons index d95dbef..b2fce7f 100644 --- a/testcases-cons +++ b/testcases-cons @@ -369,7 +369,48 @@ BEGIN { 0 1 brk +0 +1 1 +0 +0 +-- +24: +$cppawk ' +#include <cons.h> + +function same(left, right) +{ + return equalize(left) == equalize(right) +} + +BEGIN { + print same("", undef), same(0, 0), same(-1, -1), same("", "") + print same("", "a"), same(0, 1), same(-1, 1), same("Tabc", "xyz") + print same("1", "1.0"), same(box("abc"), "abc") + print same(box(undef), box(undef)) + print same(cons("1", "2"), cons("1.0", "2.0")) + print same(cons("1", "3"), cons("1.0", "2.0")) + print same(cons("3", "2"), cons("1.0", "2.0")) + print same(cons("1a", "2a"), cons("1b", "2b")) + print "brk" + print same(box_str(1.0), 1.0) + print same(box_str(1.0), box_str("1")) + print same(box_str(1.0), box_str(1.0)) + print same(box_str(1.0), "1.0") + print same("1.0", box_str(1.0)) +}' +: +1 1 1 1 +0 0 0 0 +1 1 +1 +1 +0 +0 +1 +brk +0 1 1 0 |