Evan Hanson <ev...@foldling.org> writes: > On 2019-01-10 18:12, megane wrote: >> Evan Hanson <ev...@foldling.org> writes: [snip] >> Do you agree with approach I took about gensym'd variables in the second >> patch? If not, I think I'll have to come up with something else. > > That's a nice idea, I think it's probably fine. But if we're going to do > that, why not wipe line numbers in all the expected files rather than > just the new one? >
Good idea. >> diff --git a/tests/redact-gensyms.scm b/tests/redact-gensyms.scm >> new file mode 100644 >> index 0000000..c6abb7b >> --- /dev/null >> +++ b/tests/redact-gensyms.scm >> @@ -0,0 +1,25 @@ >> + (define prefixes (if (null? (command-line-arguments)) >> + '("tmp" "g") >> + (string-split (car (command-line-arguments)) ","))) >> + >> + (let ((rege (irregex `(: ($ (or ,@prefixes)) (+ numeric))))) > > This regex could be `(: bow ($ (or ,@prefixes)) (+ numeric)) so you avoid > accidentally replacing numbers in something like a variable called "dog1". > Didn't think of that, good catch. Here's a modified patch that does these two things. It occurred to me that perhaps redact-gensyms shouldn't use XXX as the replacement as that's used in comments in the codebase. It could make grepping for XXXs a bit painful.
>From 999b2534cff88a13f040a23b9e7bec1c1c8ca351 Mon Sep 17 00:00:00 2001 From: megane <megan...@gmail.com> Date: Wed, 28 Nov 2018 17:28:03 +0200 Subject: [PATCH] tests/runtests.sh: Sanitize gensyms from scrutinizer outputs Instead of skipping tests that are sensitive to gensyms altogether try to sanitize the output. For scrutinizer-message-format.scm, sanitize a and b because they are used in typevars. These are removed once the scrutinizer sanitizes typevars in messages internally again (fix for #1563 broke this). Also, sanitize "scm:" so line number mismatches do not cause million diff conflicts when adding/removing stuff to/from tests. * tests/redact-gensyms.scm: New small program to replace numbers from common gensym prefixes * [tests] runtests.sh: compile, use redact-gensyms --- distribution/manifest | 1 + tests/redact-gensyms.scm | 25 +++++++ tests/runtests.sh | 31 +++----- tests/scrutinizer-message-format.expected | 42 ++++++----- tests/scrutiny-2.expected | 46 ++++++------ tests/scrutiny.expected | 118 +++++++++++++++--------------- tests/specialization.expected | 18 +++-- 7 files changed, 154 insertions(+), 127 deletions(-) create mode 100644 tests/redact-gensyms.scm diff --git a/distribution/manifest b/distribution/manifest index c1a615e..928d5ef 100644 --- a/distribution/manifest +++ b/distribution/manifest @@ -176,6 +176,7 @@ tests/scrutiny-tests-2.scm tests/scrutiny-tests-3.scm tests/scrutiny.expected tests/scrutiny-2.expected +tests/redact-gensyms.scm tests/test-scrutinizer-message-format.scm tests/scrutinizer-message-format.expected tests/syntax-rule-stress-test.scm diff --git a/tests/redact-gensyms.scm b/tests/redact-gensyms.scm new file mode 100644 index 0000000..31ca8a2 --- /dev/null +++ b/tests/redact-gensyms.scm @@ -0,0 +1,25 @@ +(module + redact-gensyms + () + (import scheme) + (import (chicken base)) + (import (chicken irregex)) + (import (chicken type)) + (import (only (chicken io) read-line) + (only (chicken process-context) command-line-arguments) + (only (chicken string) string-split)) + + (define prefixes (if (null? (command-line-arguments)) + '("tmp" "g" "scm:") + (string-split (car (command-line-arguments)) ","))) + + (let ((rege (irregex `(: bow ($ (or ,@prefixes)) (+ numeric))))) + (print ";; numbers replaced with XXX by redact-gensyms.scm") + (print ";; prefixes: " prefixes) + (let lp () + (let ((l (read-line))) + (if (not (eof-object? l)) + (begin + (print (irregex-replace/all rege l 1 "XXX")) + (lp)))))) + ) diff --git a/tests/runtests.sh b/tests/runtests.sh index c6f9252..7b067b7 100755 --- a/tests/runtests.sh +++ b/tests/runtests.sh @@ -114,28 +114,21 @@ $compile typematch-tests.scm -specialize -no-warnings $compile scrutiny-tests.scm -analyze-only -verbose 2>scrutiny.out $compile specialization-tests.scm -analyze-only -verbose -specialize 2>specialization.out - -# these are sensitive to gensym-names, so make them optional -if test \! -f scrutiny.expected; then - cp scrutiny.expected scrutiny.out -fi -if test \! -f specialization.expected; then - cp specialization.expected specialization.out -fi - $compile scrutiny-tests-2.scm -A -verbose 2>scrutiny-2.out $compile test-scrutinizer-message-format.scm -A -verbose 2>scrutinizer-message-format.out || true -diff $DIFF_OPTS scrutinizer-message-format.expected scrutinizer-message-format.out -diff $DIFF_OPTS scrutiny.expected scrutiny.out -diff $DIFF_OPTS specialization.expected specialization.out - -# this is sensitive to gensym-names, so make it optional -if test \! -f scrutiny-2.expected; then - cp scrutiny-2.expected scrutiny-2.out -fi - -diff $DIFF_OPTS scrutiny-2.expected scrutiny-2.out +# Replace foo123 -> fooXX so gensyms don't trigger failures +$compile redact-gensyms.scm +mv a.out redact-gensyms +./redact-gensyms "tmp,g,scm:,a,b" < scrutinizer-message-format.out > scrutinizer-message-format.redacted +./redact-gensyms < scrutiny-2.out > scrutiny-2.redacted +./redact-gensyms < scrutiny.out > scrutiny.redacted +./redact-gensyms < specialization.out > specialization.redacted + +diff $DIFF_OPTS scrutinizer-message-format.expected scrutinizer-message-format.redacted +diff $DIFF_OPTS scrutiny-2.expected scrutiny-2.redacted +diff $DIFF_OPTS scrutiny.expected scrutiny.redacted +diff $DIFF_OPTS specialization.expected specialization.redacted $compile scrutiny-tests-3.scm -specialize -block ./a.out diff --git a/tests/scrutinizer-message-format.expected b/tests/scrutinizer-message-format.expected index f41fb89..a1e96b0 100644 --- a/tests/scrutinizer-message-format.expected +++ b/tests/scrutinizer-message-format.expected @@ -1,19 +1,21 @@ +;; numbers replaced with XXX by redact-gensyms.scm +;; prefixes: (tmp g scm: a b) Warning: literal in operator position: (1 2) Warning: literal in operator position: (1 2) Warning: in toplevel procedure `r-proc-call-argument-count-mismatch': - (test-scrutinizer-message-format.scm:9) in procedure call to `scheme#cons', expected 2 arguments but was given 1 argument + (test-scrutinizer-message-format.scm:XXX) in procedure call to `scheme#cons', expected 2 arguments but was given 1 argument Warning: in toplevel procedure `r-proc-call-argument-type-mismatch': - (test-scrutinizer-message-format.scm:10) in procedure call to `scheme#length', expected argument #1 of type `list' but was given an argument of type `symbol' + (test-scrutinizer-message-format.scm:XXX) in procedure call to `scheme#length', expected argument #1 of type `list' but was given an argument of type `symbol' Warning: in toplevel procedure `r-proc-call-argument-value-count': - (test-scrutinizer-message-format.scm:11) expected a single result in argument #1 of procedure call `(scheme#list (chicken.time#cpu-time))', but received 2 results + (test-scrutinizer-message-format.scm:XXX) expected a single result in argument #1 of procedure call `(scheme#list (chicken.time#cpu-time))', but received 2 results Warning: in toplevel procedure `r-proc-call-argument-value-count': - (test-scrutinizer-message-format.scm:11) expected a single result in argument #1 of procedure call `(scheme#vector (scheme#values))', but received zero results + (test-scrutinizer-message-format.scm:XXX) expected a single result in argument #1 of procedure call `(scheme#vector (scheme#values))', but received zero results Warning: in toplevel procedure `r-cond-branch-value-count-mismatch': branches in conditional expression differ in the number of results: @@ -24,10 +26,10 @@ Warning: in toplevel procedure `r-invalid-called-procedure-type': in procedure call to `1', expected a value of type `(procedure (*) *)' but was given a value of type `fixnum' Note: in toplevel procedure `r-pred-call-always-true': - (test-scrutinizer-message-format.scm:14) in procedure call to `scheme#list?', the predicate is called with an argument of type `null' and will always return true + (test-scrutinizer-message-format.scm:XXX) in procedure call to `scheme#list?', the predicate is called with an argument of type `null' and will always return true Note: in toplevel procedure `r-pred-call-always-false': - (test-scrutinizer-message-format.scm:15) in procedure call to `scheme#symbol?', the predicate is called with an argument of type `fixnum' and will always return false + (test-scrutinizer-message-format.scm:XXX) in procedure call to `scheme#symbol?', the predicate is called with an argument of type `fixnum' and will always return false Note: in toplevel procedure `r-cond-test-always-true': expected a value of type boolean in conditional, but was given a value of type `symbol' which is always true: @@ -64,27 +66,27 @@ Warning: at toplevel: assignment of value of type `fixnum' to toplevel variable `foo' does not match declared type `boolean' Warning: in toplevel procedure `append-invalid-arg': - (test-scrutinizer-message-format.scm:26) in procedure call to `scheme#append', argument #1 is of type fixnum but expected a proper list + (test-scrutinizer-message-format.scm:XXX) in procedure call to `scheme#append', argument #1 is of type fixnum but expected a proper list Warning: in local procedure `r-proc-call-argument-count-mismatch', in local procedure `local-bar', in toplevel procedure `m#toplevel-foo': - (test-scrutinizer-message-format.scm:45) in procedure call to `scheme#cons', expected 2 arguments but was given 1 argument + (test-scrutinizer-message-format.scm:XXX) in procedure call to `scheme#cons', expected 2 arguments but was given 1 argument Warning: in local procedure `r-proc-call-argument-type-mismatch', in local procedure `local-bar', in toplevel procedure `m#toplevel-foo': - (test-scrutinizer-message-format.scm:46) in procedure call to `scheme#string-length', expected argument #1 of type `string' but was given an argument of type `(procedure chicken.base#add1 (number) number)' + (test-scrutinizer-message-format.scm:XXX) in procedure call to `scheme#string-length', expected argument #1 of type `string' but was given an argument of type `(procedure chicken.base#add1 (number) number)' Warning: in local procedure `r-proc-call-argument-value-count', in local procedure `local-bar', in toplevel procedure `m#toplevel-foo': - (test-scrutinizer-message-format.scm:47) expected a single result in argument #1 of procedure call `(scheme#list (chicken.time#cpu-time))', but received 2 results + (test-scrutinizer-message-format.scm:XXX) expected a single result in argument #1 of procedure call `(scheme#list (chicken.time#cpu-time))', but received 2 results Warning: in local procedure `r-proc-call-argument-value-count', in local procedure `local-bar', in toplevel procedure `m#toplevel-foo': - (test-scrutinizer-message-format.scm:47) expected a single result in argument #1 of procedure call `(scheme#vector (scheme#values))', but received zero results + (test-scrutinizer-message-format.scm:XXX) expected a single result in argument #1 of procedure call `(scheme#vector (scheme#values))', but received zero results Warning: in local procedure `r-cond-branch-value-count-mismatch', in local procedure `local-bar', @@ -97,7 +99,7 @@ Warning: in local procedure `variable', in local procedure `r-invalid-called-procedure-type', in local procedure `local-bar', in toplevel procedure `m#toplevel-foo': - (test-scrutinizer-message-format.scm:50) in procedure call to `m#foo2', expected a value of type `(procedure (*) *)' but was given a value of type `boolean' + (test-scrutinizer-message-format.scm:XXX) in procedure call to `m#foo2', expected a value of type `(procedure (*) *)' but was given a value of type `boolean' Warning: in local procedure `non-variable', in local procedure `r-invalid-called-procedure-type', @@ -108,17 +110,17 @@ Warning: in local procedure `non-variable', Note: in local procedure `r-pred-call-always-true', in local procedure `local-bar', in toplevel procedure `m#toplevel-foo': - (test-scrutinizer-message-format.scm:52) in procedure call to `scheme#list?', the predicate is called with an argument of type `null' and will always return true + (test-scrutinizer-message-format.scm:XXX) in procedure call to `scheme#list?', the predicate is called with an argument of type `null' and will always return true Note: in local procedure `r-pred-call-always-false', in local procedure `local-bar', in toplevel procedure `m#toplevel-foo': - (test-scrutinizer-message-format.scm:53) in procedure call to `scheme#symbol?', the predicate is called with an argument of type `fixnum' and will always return false + (test-scrutinizer-message-format.scm:XXX) in procedure call to `scheme#symbol?', the predicate is called with an argument of type `fixnum' and will always return false Note: in local procedure `r-cond-test-always-true', in local procedure `local-bar', in toplevel procedure `m#toplevel-foo': - (test-scrutinizer-message-format.scm:54) expected a value of type boolean in conditional, but was given a value of type `fixnum' which is always true: + (test-scrutinizer-message-format.scm:XXX) expected a value of type boolean in conditional, but was given a value of type `fixnum' which is always true: (if (scheme#length '()) 1 (##core#undefined)) @@ -233,29 +235,29 @@ Warning: in local procedure `too-many-values-for-assignment', Warning: in local procedure `append-invalid-arg', in local procedure `local-bar', in toplevel procedure `m#toplevel-foo': - (test-scrutinizer-message-format.scm:80) in procedure call to `scheme#append', argument #1 is of type fixnum but expected a proper list + (test-scrutinizer-message-format.scm:XXX) in procedure call to `scheme#append', argument #1 is of type fixnum but expected a proper list Warning: in local procedure `list-ref-negative-index', in local procedure `vector-list-out-of-range', in local procedure `local-bar', in toplevel procedure `m#toplevel-foo': - (test-scrutinizer-message-format.scm:82) in procedure call to `scheme#list-ref', index -1 is negative, which is never valid + (test-scrutinizer-message-format.scm:XXX) in procedure call to `scheme#list-ref', index -1 is negative, which is never valid Warning: in local procedure `list-ref-out-of-range', in local procedure `vector-list-out-of-range', in local procedure `local-bar', in toplevel procedure `m#toplevel-foo': - (test-scrutinizer-message-format.scm:83) in procedure call to `scheme#list-ref', index 1 out of range for proper list of length 0 + (test-scrutinizer-message-format.scm:XXX) in procedure call to `scheme#list-ref', index 1 out of range for proper list of length 0 Warning: in local procedure `vector-ref-out-of-range', in local procedure `vector-list-out-of-range', in local procedure `local-bar', in toplevel procedure `m#toplevel-foo': - (test-scrutinizer-message-format.scm:84) in procedure call to `scheme#vector-ref', index -1 out of range for vector of length 0 + (test-scrutinizer-message-format.scm:XXX) in procedure call to `scheme#vector-ref', index -1 out of range for vector of length 0 Error: in local procedure `fail-compiler-typecase', in local procedure `local-bar', in toplevel procedure `m#toplevel-foo': - (test-scrutinizer-message-format.scm:86) no clause applies in `compiler-typecase' for expression of type `fixnum': + (test-scrutinizer-message-format.scm:XXX) no clause applies in `compiler-typecase' for expression of type `fixnum': symbol list diff --git a/tests/scrutiny-2.expected b/tests/scrutiny-2.expected index 9058276..79c7ad5 100644 --- a/tests/scrutiny-2.expected +++ b/tests/scrutiny-2.expected @@ -1,66 +1,68 @@ +;; numbers replaced with XXX by redact-gensyms.scm +;; prefixes: (tmp g scm:) Note: at toplevel: - (scrutiny-tests-2.scm:20) in procedure call to `scheme#pair?', the predicate is called with an argument of type `pair' and will always return true + (scrutiny-tests-2.scm:XXX) in procedure call to `scheme#pair?', the predicate is called with an argument of type `pair' and will always return true Note: at toplevel: - (scrutiny-tests-2.scm:20) in procedure call to `scheme#pair?', the predicate is called with an argument of type `null' and will always return false + (scrutiny-tests-2.scm:XXX) in procedure call to `scheme#pair?', the predicate is called with an argument of type `null' and will always return false Note: at toplevel: - (scrutiny-tests-2.scm:20) in procedure call to `scheme#pair?', the predicate is called with an argument of type `null' and will always return false + (scrutiny-tests-2.scm:XXX) in procedure call to `scheme#pair?', the predicate is called with an argument of type `null' and will always return false Note: at toplevel: - (scrutiny-tests-2.scm:20) in procedure call to `scheme#pair?', the predicate is called with an argument of type `fixnum' and will always return false + (scrutiny-tests-2.scm:XXX) in procedure call to `scheme#pair?', the predicate is called with an argument of type `fixnum' and will always return false Note: at toplevel: - (scrutiny-tests-2.scm:20) in procedure call to `scheme#pair?', the predicate is called with an argument of type `float' and will always return false + (scrutiny-tests-2.scm:XXX) in procedure call to `scheme#pair?', the predicate is called with an argument of type `float' and will always return false Note: at toplevel: - (scrutiny-tests-2.scm:21) in procedure call to `scheme#list?', the predicate is called with an argument of type `null' and will always return true + (scrutiny-tests-2.scm:XXX) in procedure call to `scheme#list?', the predicate is called with an argument of type `null' and will always return true Note: at toplevel: - (scrutiny-tests-2.scm:21) in procedure call to `scheme#list?', the predicate is called with an argument of type `null' and will always return true + (scrutiny-tests-2.scm:XXX) in procedure call to `scheme#list?', the predicate is called with an argument of type `null' and will always return true Note: at toplevel: - (scrutiny-tests-2.scm:21) in procedure call to `scheme#list?', the predicate is called with an argument of type `fixnum' and will always return false + (scrutiny-tests-2.scm:XXX) in procedure call to `scheme#list?', the predicate is called with an argument of type `fixnum' and will always return false Note: at toplevel: - (scrutiny-tests-2.scm:21) in procedure call to `scheme#list?', the predicate is called with an argument of type `float' and will always return false + (scrutiny-tests-2.scm:XXX) in procedure call to `scheme#list?', the predicate is called with an argument of type `float' and will always return false Note: at toplevel: - (scrutiny-tests-2.scm:22) in procedure call to `scheme#null?', the predicate is called with an argument of type `null' and will always return true + (scrutiny-tests-2.scm:XXX) in procedure call to `scheme#null?', the predicate is called with an argument of type `null' and will always return true Note: at toplevel: - (scrutiny-tests-2.scm:22) in procedure call to `scheme#null?', the predicate is called with an argument of type `null' and will always return true + (scrutiny-tests-2.scm:XXX) in procedure call to `scheme#null?', the predicate is called with an argument of type `null' and will always return true Note: at toplevel: - (scrutiny-tests-2.scm:22) in procedure call to `scheme#null?', the predicate is called with an argument of type `pair' and will always return false + (scrutiny-tests-2.scm:XXX) in procedure call to `scheme#null?', the predicate is called with an argument of type `pair' and will always return false Note: at toplevel: - (scrutiny-tests-2.scm:22) in procedure call to `scheme#null?', the predicate is called with an argument of type `fixnum' and will always return false + (scrutiny-tests-2.scm:XXX) in procedure call to `scheme#null?', the predicate is called with an argument of type `fixnum' and will always return false Note: at toplevel: - (scrutiny-tests-2.scm:22) in procedure call to `scheme#null?', the predicate is called with an argument of type `float' and will always return false + (scrutiny-tests-2.scm:XXX) in procedure call to `scheme#null?', the predicate is called with an argument of type `float' and will always return false Note: at toplevel: - (scrutiny-tests-2.scm:23) in procedure call to `chicken.base#fixnum?', the predicate is called with an argument of type `fixnum' and will always return true + (scrutiny-tests-2.scm:XXX) in procedure call to `chicken.base#fixnum?', the predicate is called with an argument of type `fixnum' and will always return true Note: at toplevel: - (scrutiny-tests-2.scm:23) in procedure call to `chicken.base#fixnum?', the predicate is called with an argument of type `float' and will always return false + (scrutiny-tests-2.scm:XXX) in procedure call to `chicken.base#fixnum?', the predicate is called with an argument of type `float' and will always return false Note: at toplevel: - (scrutiny-tests-2.scm:25) in procedure call to `chicken.base#flonum?', the predicate is called with an argument of type `float' and will always return true + (scrutiny-tests-2.scm:XXX) in procedure call to `chicken.base#flonum?', the predicate is called with an argument of type `float' and will always return true Note: at toplevel: - (scrutiny-tests-2.scm:25) in procedure call to `chicken.base#flonum?', the predicate is called with an argument of type `fixnum' and will always return false + (scrutiny-tests-2.scm:XXX) in procedure call to `chicken.base#flonum?', the predicate is called with an argument of type `fixnum' and will always return false Note: at toplevel: - (scrutiny-tests-2.scm:27) in procedure call to `scheme#number?', the predicate is called with an argument of type `fixnum' and will always return true + (scrutiny-tests-2.scm:XXX) in procedure call to `scheme#number?', the predicate is called with an argument of type `fixnum' and will always return true Note: at toplevel: - (scrutiny-tests-2.scm:27) in procedure call to `scheme#number?', the predicate is called with an argument of type `float' and will always return true + (scrutiny-tests-2.scm:XXX) in procedure call to `scheme#number?', the predicate is called with an argument of type `float' and will always return true Note: at toplevel: - (scrutiny-tests-2.scm:27) in procedure call to `scheme#number?', the predicate is called with an argument of type `number' and will always return true + (scrutiny-tests-2.scm:XXX) in procedure call to `scheme#number?', the predicate is called with an argument of type `number' and will always return true Note: at toplevel: - (scrutiny-tests-2.scm:27) in procedure call to `scheme#number?', the predicate is called with an argument of type `null' and will always return false + (scrutiny-tests-2.scm:XXX) in procedure call to `scheme#number?', the predicate is called with an argument of type `null' and will always return false diff --git a/tests/scrutiny.expected b/tests/scrutiny.expected index e445ebb..0bc6a8d 100644 --- a/tests/scrutiny.expected +++ b/tests/scrutiny.expected @@ -1,5 +1,7 @@ +;; numbers replaced with XXX by redact-gensyms.scm +;; prefixes: (tmp g scm:) -Warning: (scrutiny-tests.scm:31) - assignment to imported value binding `car' +Warning: (scrutiny-tests.scm:XXX) - assignment to imported value binding `car' Note: in local procedure `c', in local procedure `b', @@ -19,34 +21,34 @@ Warning: in toplevel procedure `foo': (if x (scheme#values 1 2) (scheme#values 1 2 (scheme#+ (scheme#+ ...)))) Warning: at toplevel: - (scrutiny-tests.scm:19) in procedure call to `bar', expected argument #2 of type `number' but was given an argument of type `symbol' + (scrutiny-tests.scm:XXX) in procedure call to `bar', expected argument #2 of type `number' but was given an argument of type `symbol' Warning: at toplevel: - (scrutiny-tests.scm:21) in procedure call to `scheme#string?', expected 1 argument but was given 0 arguments + (scrutiny-tests.scm:XXX) in procedure call to `scheme#string?', expected 1 argument but was given 0 arguments Warning: at toplevel: - (scrutiny-tests.scm:23) expected a single result in argument #1 of procedure call `(chicken.base#print (scheme#values 1 2))', but received 2 results + (scrutiny-tests.scm:XXX) expected a single result in argument #1 of procedure call `(chicken.base#print (scheme#values 1 2))', but received 2 results Warning: at toplevel: - (scrutiny-tests.scm:24) expected a single result in argument #1 of procedure call `(chicken.base#print (scheme#values))', but received zero results + (scrutiny-tests.scm:XXX) expected a single result in argument #1 of procedure call `(chicken.base#print (scheme#values))', but received zero results Warning: at toplevel: - (scrutiny-tests.scm:27) in procedure call to `x', expected a value of type `(procedure () *)' but was given a value of type `fixnum' + (scrutiny-tests.scm:XXX) in procedure call to `x', expected a value of type `(procedure () *)' but was given a value of type `fixnum' Warning: at toplevel: - (scrutiny-tests.scm:29) in procedure call to `scheme#+', expected argument #1 of type `number' but was given an argument of type `symbol' + (scrutiny-tests.scm:XXX) in procedure call to `scheme#+', expected argument #1 of type `number' but was given an argument of type `symbol' Warning: at toplevel: - (scrutiny-tests.scm:29) in procedure call to `scheme#+', expected argument #2 of type `number' but was given an argument of type `symbol' + (scrutiny-tests.scm:XXX) in procedure call to `scheme#+', expected argument #2 of type `number' but was given an argument of type `symbol' Warning: at toplevel: assignment of value of type `fixnum' to toplevel variable `scheme#car' does not match declared type `(forall (a335) (procedure scheme#car ((pair a335 *)) a335))' Warning: at toplevel: - expected a single result in `let' binding of `g19', but received 2 results + expected a single result in `let' binding of `gXXX', but received 2 results Warning: at toplevel: - in procedure call to `g19', expected a value of type `(procedure () *)' but was given a value of type `fixnum' + in procedure call to `gXXX', expected a value of type `(procedure () *)' but was given a value of type `fixnum' Note: in toplevel procedure `foo': expected a value of type boolean in conditional, but was given a value of type `(procedure bar () *)' which is always true: @@ -54,34 +56,34 @@ Note: in toplevel procedure `foo': (if bar 3 (##core#undefined)) Warning: in toplevel procedure `foo2': - (scrutiny-tests.scm:58) in procedure call to `scheme#string-append', expected argument #1 of type `string' but was given an argument of type `number' + (scrutiny-tests.scm:XXX) in procedure call to `scheme#string-append', expected argument #1 of type `string' but was given an argument of type `number' Warning: at toplevel: - (scrutiny-tests.scm:66) in procedure call to `foo3', expected argument #1 of type `string' but was given an argument of type `fixnum' + (scrutiny-tests.scm:XXX) in procedure call to `foo3', expected argument #1 of type `string' but was given an argument of type `fixnum' Warning: in toplevel procedure `foo4': - (scrutiny-tests.scm:71) in procedure call to `scheme#+', expected argument #1 of type `number' but was given an argument of type `string' + (scrutiny-tests.scm:XXX) in procedure call to `scheme#+', expected argument #1 of type `number' but was given an argument of type `string' Warning: in toplevel procedure `foo5': - (scrutiny-tests.scm:77) in procedure call to `scheme#+', expected argument #1 of type `number' but was given an argument of type `string' + (scrutiny-tests.scm:XXX) in procedure call to `scheme#+', expected argument #1 of type `number' but was given an argument of type `string' Warning: in toplevel procedure `foo6': - (scrutiny-tests.scm:83) in procedure call to `scheme#+', expected argument #1 of type `number' but was given an argument of type `string' + (scrutiny-tests.scm:XXX) in procedure call to `scheme#+', expected argument #1 of type `number' but was given an argument of type `string' Warning: at toplevel: - (scrutiny-tests.scm:90) in procedure call to `scheme#+', expected argument #1 of type `number' but was given an argument of type `string' + (scrutiny-tests.scm:XXX) in procedure call to `scheme#+', expected argument #1 of type `number' but was given an argument of type `string' Warning: in toplevel procedure `foo10': - (scrutiny-tests.scm:104) in procedure call to `foo9', expected argument #1 of type `string' but was given an argument of type `number' + (scrutiny-tests.scm:XXX) in procedure call to `foo9', expected argument #1 of type `string' but was given an argument of type `number' Warning: in toplevel procedure `foo10': - (scrutiny-tests.scm:105) in procedure call to `scheme#+', expected argument #1 of type `number' but was given an argument of type `string' + (scrutiny-tests.scm:XXX) in procedure call to `scheme#+', expected argument #1 of type `number' but was given an argument of type `string' Note: in toplevel procedure `foo10': expression returns a result of type `string' but is declared to return `pair', which is not compatible Warning: in toplevel procedure `foo10': - (scrutiny-tests.scm:109) in procedure call to `scheme#string-append', expected argument #1 of type `string' but was given an argument of type `pair' + (scrutiny-tests.scm:XXX) in procedure call to `scheme#string-append', expected argument #1 of type `string' but was given an argument of type `pair' Warning: in toplevel procedure `foo10': expression returns 2 values but is declared to have a single result @@ -90,10 +92,10 @@ Warning: in toplevel procedure `foo10': expression returns zero values but is declared to have a single result of type `*' Warning: in toplevel procedure `foo10': - (scrutiny-tests.scm:112) in procedure call to `scheme#*', expected argument #1 of type `number' but was given an argument of type `string' + (scrutiny-tests.scm:XXX) in procedure call to `scheme#*', expected argument #1 of type `number' but was given an argument of type `string' Warning: in toplevel procedure `foo#blabla': - (scrutiny-tests.scm:137) in procedure call to `scheme#+', expected argument #2 of type `number' but was given an argument of type `symbol' + (scrutiny-tests.scm:XXX) in procedure call to `scheme#+', expected argument #2 of type `number' but was given an argument of type `symbol' Warning: at toplevel: use of deprecated `deprecated-procedure' @@ -102,114 +104,114 @@ Warning: at toplevel: use of deprecated `another-deprecated-procedure' - consider `replacement-procedure' Warning: at toplevel: - (scrutiny-tests.scm:168) in procedure call to `apply1', expected argument #2 of type `(list-of number)' but was given an argument of type `(list symbol fixnum fixnum)' + (scrutiny-tests.scm:XXX) in procedure call to `apply1', expected argument #2 of type `(list-of number)' but was given an argument of type `(list symbol fixnum fixnum)' Warning: at toplevel: - (scrutiny-tests.scm:169) in procedure call to `apply1', expected argument #2 of type `(list-of number)' but was given an argument of type `(list symbol fixnum fixnum)' + (scrutiny-tests.scm:XXX) in procedure call to `apply1', expected argument #2 of type `(list-of number)' but was given an argument of type `(list symbol fixnum fixnum)' Note: at toplevel: - (scrutiny-tests.scm:182) in procedure call to `chicken.base#fixnum?', the predicate is called with an argument of type `fixnum' and will always return true + (scrutiny-tests.scm:XXX) in procedure call to `chicken.base#fixnum?', the predicate is called with an argument of type `fixnum' and will always return true Note: at toplevel: - (scrutiny-tests.scm:190) in procedure call to `scheme#symbol?', the predicate is called with an argument of type `(or char string)' and will always return false + (scrutiny-tests.scm:XXX) in procedure call to `scheme#symbol?', the predicate is called with an argument of type `(or char string)' and will always return false Note: at toplevel: - (scrutiny-tests.scm:191) in procedure call to `scheme#string?', the predicate is called with an argument of type `(not (or char string))' and will always return false + (scrutiny-tests.scm:XXX) in procedure call to `scheme#string?', the predicate is called with an argument of type `(not (or char string))' and will always return false Note: at toplevel: - (scrutiny-tests.scm:194) in procedure call to `char-or-string?', the predicate is called with an argument of type `fixnum' and will always return false + (scrutiny-tests.scm:XXX) in procedure call to `char-or-string?', the predicate is called with an argument of type `fixnum' and will always return false Note: at toplevel: - (scrutiny-tests.scm:195) in procedure call to `scheme#symbol?', the predicate is called with an argument of type `(or char string)' and will always return false + (scrutiny-tests.scm:XXX) in procedure call to `scheme#symbol?', the predicate is called with an argument of type `(or char string)' and will always return false Note: at toplevel: - (scrutiny-tests.scm:196) in procedure call to `scheme#string?', the predicate is called with an argument of type `fixnum' and will always return false + (scrutiny-tests.scm:XXX) in procedure call to `scheme#string?', the predicate is called with an argument of type `fixnum' and will always return false Note: at toplevel: - (scrutiny-tests.scm:200) in procedure call to `scheme#symbol?', the predicate is called with an argument of type `char' and will always return false + (scrutiny-tests.scm:XXX) in procedure call to `scheme#symbol?', the predicate is called with an argument of type `char' and will always return false Note: at toplevel: - (scrutiny-tests.scm:201) in procedure call to `scheme#string?', the predicate is called with an argument of type `symbol' and will always return false + (scrutiny-tests.scm:XXX) in procedure call to `scheme#string?', the predicate is called with an argument of type `symbol' and will always return false Note: at toplevel: - (scrutiny-tests.scm:205) in procedure call to `scheme#symbol?', the predicate is called with an argument of type `(or char string)' and will always return false + (scrutiny-tests.scm:XXX) in procedure call to `scheme#symbol?', the predicate is called with an argument of type `(or char string)' and will always return false Note: at toplevel: - (scrutiny-tests.scm:206) in procedure call to `scheme#string?', the predicate is called with an argument of type `symbol' and will always return false + (scrutiny-tests.scm:XXX) in procedure call to `scheme#string?', the predicate is called with an argument of type `symbol' and will always return false Warning: at toplevel: - (scrutiny-tests.scm:210) in procedure call to `f', expected argument #1 of type `pair' but was given an argument of type `null' + (scrutiny-tests.scm:XXX) in procedure call to `f', expected argument #1 of type `pair' but was given an argument of type `null' Warning: at toplevel: - (scrutiny-tests.scm:212) in procedure call to `f', expected argument #1 of type `null' but was given an argument of type `(list fixnum)' + (scrutiny-tests.scm:XXX) in procedure call to `f', expected argument #1 of type `null' but was given an argument of type `(list fixnum)' Warning: at toplevel: - (scrutiny-tests.scm:214) in procedure call to `f', expected argument #1 of type `list' but was given an argument of type `(pair fixnum fixnum)' + (scrutiny-tests.scm:XXX) in procedure call to `f', expected argument #1 of type `list' but was given an argument of type `(pair fixnum fixnum)' Warning: in toplevel procedure `vector-ref-warn1': - (scrutiny-tests.scm:220) in procedure call to `scheme#vector-ref', index -1 out of range for vector of length 3 + (scrutiny-tests.scm:XXX) in procedure call to `scheme#vector-ref', index -1 out of range for vector of length 3 Warning: in toplevel procedure `vector-ref-warn2': - (scrutiny-tests.scm:222) in procedure call to `scheme#vector-ref', index 3 out of range for vector of length 3 + (scrutiny-tests.scm:XXX) in procedure call to `scheme#vector-ref', index 3 out of range for vector of length 3 Warning: in toplevel procedure `vector-ref-warn3': - (scrutiny-tests.scm:223) in procedure call to `scheme#vector-ref', index 4 out of range for vector of length 3 + (scrutiny-tests.scm:XXX) in procedure call to `scheme#vector-ref', index 4 out of range for vector of length 3 Warning: in toplevel procedure `vector-ref-standard-warn1': - (scrutiny-tests.scm:226) in procedure call to `scheme#vector-ref', expected argument #2 of type `fixnum' but was given an argument of type `symbol' + (scrutiny-tests.scm:XXX) in procedure call to `scheme#vector-ref', expected argument #2 of type `fixnum' but was given an argument of type `symbol' Warning: in toplevel procedure `vector-set!-warn1': - (scrutiny-tests.scm:227) in procedure call to `scheme#vector-set!', index -1 out of range for vector of length 3 + (scrutiny-tests.scm:XXX) in procedure call to `scheme#vector-set!', index -1 out of range for vector of length 3 Warning: in toplevel procedure `vector-set!-warn2': - (scrutiny-tests.scm:228) in procedure call to `scheme#vector-set!', index 3 out of range for vector of length 3 + (scrutiny-tests.scm:XXX) in procedure call to `scheme#vector-set!', index 3 out of range for vector of length 3 Warning: in toplevel procedure `vector-set!-warn3': - (scrutiny-tests.scm:229) in procedure call to `scheme#vector-set!', index 4 out of range for vector of length 3 + (scrutiny-tests.scm:XXX) in procedure call to `scheme#vector-set!', index 4 out of range for vector of length 3 Warning: in toplevel procedure `vector-set!-standard-warn1': - (scrutiny-tests.scm:232) in procedure call to `scheme#vector-set!', expected argument #2 of type `fixnum' but was given an argument of type `symbol' + (scrutiny-tests.scm:XXX) in procedure call to `scheme#vector-set!', expected argument #2 of type `fixnum' but was given an argument of type `symbol' Warning: in toplevel procedure `list-ref-warn1': - (scrutiny-tests.scm:238) in procedure call to `scheme#list-ref', index -1 is negative, which is never valid + (scrutiny-tests.scm:XXX) in procedure call to `scheme#list-ref', index -1 is negative, which is never valid Warning: in toplevel procedure `list-ref-warn2': - (scrutiny-tests.scm:241) in procedure call to `scheme#list-ref', index -1 is negative, which is never valid + (scrutiny-tests.scm:XXX) in procedure call to `scheme#list-ref', index -1 is negative, which is never valid Warning: in toplevel procedure `list-ref-warn3': - (scrutiny-tests.scm:244) in procedure call to `scheme#list-ref', index -1 is negative, which is never valid + (scrutiny-tests.scm:XXX) in procedure call to `scheme#list-ref', index -1 is negative, which is never valid Warning: in toplevel procedure `list-ref-warn4': - (scrutiny-tests.scm:246) in procedure call to `scheme#list-ref', index 3 out of range for proper list of length 3 + (scrutiny-tests.scm:XXX) in procedure call to `scheme#list-ref', index 3 out of range for proper list of length 3 Warning: in toplevel procedure `list-ref-warn5': - (scrutiny-tests.scm:252) in procedure call to `scheme#list-ref', index 4 out of range for proper list of length 3 + (scrutiny-tests.scm:XXX) in procedure call to `scheme#list-ref', index 4 out of range for proper list of length 3 Warning: in toplevel procedure `list-ref-standard-warn1': - (scrutiny-tests.scm:281) in procedure call to `scheme#list-ref', expected argument #2 of type `fixnum' but was given an argument of type `symbol' + (scrutiny-tests.scm:XXX) in procedure call to `scheme#list-ref', expected argument #2 of type `fixnum' but was given an argument of type `symbol' Warning: in toplevel procedure `list-ref-standard-warn2': - (scrutiny-tests.scm:282) in procedure call to `scheme#list-ref', expected argument #2 of type `fixnum' but was given an argument of type `symbol' + (scrutiny-tests.scm:XXX) in procedure call to `scheme#list-ref', expected argument #2 of type `fixnum' but was given an argument of type `symbol' Warning: in toplevel procedure `list-ref-standard-warn3': - (scrutiny-tests.scm:284) in procedure call to `scheme#list-ref', expected argument #2 of type `fixnum' but was given an argument of type `symbol' + (scrutiny-tests.scm:XXX) in procedure call to `scheme#list-ref', expected argument #2 of type `fixnum' but was given an argument of type `symbol' Warning: in toplevel procedure `list-ref-standard-warn4': - (scrutiny-tests.scm:285) in procedure call to `scheme#list-ref', expected argument #2 of type `fixnum' but was given an argument of type `symbol' + (scrutiny-tests.scm:XXX) in procedure call to `scheme#list-ref', expected argument #2 of type `fixnum' but was given an argument of type `symbol' Warning: in toplevel procedure `list-ref-type-warn1': - (scrutiny-tests.scm:289) in procedure call to `chicken.base#add1', expected argument #1 of type `number' but was given an argument of type `symbol' + (scrutiny-tests.scm:XXX) in procedure call to `chicken.base#add1', expected argument #1 of type `number' but was given an argument of type `symbol' Warning: in toplevel procedure `list-ref-type-warn2': - (scrutiny-tests.scm:291) in procedure call to `chicken.base#add1', expected argument #1 of type `number' but was given an argument of type `symbol' + (scrutiny-tests.scm:XXX) in procedure call to `chicken.base#add1', expected argument #1 of type `number' but was given an argument of type `symbol' Warning: in toplevel procedure `list-ref-type-warn3': - (scrutiny-tests.scm:295) in procedure call to `chicken.base#add1', expected argument #1 of type `number' but was given an argument of type `symbol' + (scrutiny-tests.scm:XXX) in procedure call to `chicken.base#add1', expected argument #1 of type `number' but was given an argument of type `symbol' Warning: in toplevel procedure `append-result-type-warn1': - (scrutiny-tests.scm:307) in procedure call to `chicken.base#add1', expected argument #1 of type `number' but was given an argument of type `symbol' + (scrutiny-tests.scm:XXX) in procedure call to `chicken.base#add1', expected argument #1 of type `number' but was given an argument of type `symbol' Warning: in toplevel procedure `append-result-type-warn2': - (scrutiny-tests.scm:312) in procedure call to `chicken.base#add1', expected argument #1 of type `number' but was given an argument of type `symbol' + (scrutiny-tests.scm:XXX) in procedure call to `chicken.base#add1', expected argument #1 of type `number' but was given an argument of type `symbol' Warning: redefinition of standard binding: scheme#car diff --git a/tests/specialization.expected b/tests/specialization.expected index fed76b6..eff536e 100644 --- a/tests/specialization.expected +++ b/tests/specialization.expected @@ -1,32 +1,34 @@ +;; numbers replaced with XXX by redact-gensyms.scm +;; prefixes: (tmp g scm:) Note: at toplevel: - (specialization-tests.scm:3) in procedure call to `scheme#string?', the predicate is called with an argument of type `string' and will always return true + (specialization-tests.scm:XXX) in procedure call to `scheme#string?', the predicate is called with an argument of type `string' and will always return true Note: at toplevel: - (specialization-tests.scm:3) expected a value of type boolean in conditional, but was given a value of type `true' which is always true: + (specialization-tests.scm:XXX) expected a value of type boolean in conditional, but was given a value of type `true' which is always true: (if (scheme#string? a) 'ok 'no) Note: at toplevel: - (specialization-tests.scm:4) in procedure call to `scheme#string?', the predicate is called with an argument of type `symbol' and will always return false + (specialization-tests.scm:XXX) in procedure call to `scheme#string?', the predicate is called with an argument of type `symbol' and will always return false Note: at toplevel: - (specialization-tests.scm:4) in conditional, test expression will always return false: + (specialization-tests.scm:XXX) in conditional, test expression will always return false: (if (scheme#string? a) 'ok 'no) Note: at toplevel: - (specialization-tests.scm:10) in procedure call to `scheme#input-port?', the predicate is called with an argument of type `input/output-port' and will always return true + (specialization-tests.scm:XXX) in procedure call to `scheme#input-port?', the predicate is called with an argument of type `input/output-port' and will always return true Note: at toplevel: - (specialization-tests.scm:10) expected a value of type boolean in conditional, but was given a value of type `true' which is always true: + (specialization-tests.scm:XXX) expected a value of type boolean in conditional, but was given a value of type `true' which is always true: (if (scheme#input-port? p) 'ok 'no) Note: at toplevel: - (specialization-tests.scm:11) in procedure call to `scheme#output-port?', the predicate is called with an argument of type `input/output-port' and will always return true + (specialization-tests.scm:XXX) in procedure call to `scheme#output-port?', the predicate is called with an argument of type `input/output-port' and will always return true Note: at toplevel: - (specialization-tests.scm:11) expected a value of type boolean in conditional, but was given a value of type `true' which is always true: + (specialization-tests.scm:XXX) expected a value of type boolean in conditional, but was given a value of type `true' which is always true: (if (scheme#output-port? p) 'ok 'no) -- 2.7.4
_______________________________________________ Chicken-hackers mailing list Chicken-hackers@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-hackers