>From a97db18846745fc508fd470c467fad72962584b4 Mon Sep 17 00:00:00 2001 From: megane Date: Wed, 28 Nov 2018 17:28:03 +0200 Subject: [PATCH 2/2] Sanitize gensyms from scrutinizer test 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. Signed-off-by: Evan Hanson --- distribution/manifest | 1 + tests/redact-gensyms.scm | 22 ++++++ tests/runtests.bat | 35 +++++---- tests/runtests.sh | 40 ++++------ tests/scrutinizer-message-format.expected | 50 +++++++------ tests/scrutiny-2.expected | 46 ++++++------ tests/scrutiny.expected | 118 +++++++++++++++--------------- tests/specialization.expected | 18 +++-- 8 files changed, 181 insertions(+), 149 deletions(-) create mode 100644 tests/redact-gensyms.scm diff --git a/distribution/manifest b/distribution/manifest index c1a615ea..928d5ef1 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 00000000..505247be --- /dev/null +++ b/tests/redact-gensyms.scm @@ -0,0 +1,22 @@ +(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.bat b/tests/runtests.bat index 47d80c0c..49fa8348 100644 --- a/tests/runtests.bat +++ b/tests/runtests.bat @@ -93,25 +93,34 @@ if errorlevel 1 exit /b 1 a.out if errorlevel 1 exit /b 1 -%compile% scrutiny-tests.scm -A -verbose 2>scrutiny.out +%compile% test-scrutinizer-message-format.scm -A 2>scrutinizer-message-format.out +rem this is expected to fail, so no errorlevel check +%compile% scrutiny-tests.scm -A 2>scrutiny.out if errorlevel 1 exit /b 1 - -rem this is sensitive to gensym-names, so make it optional -if not exist scrutiny.expected copy /Y scrutiny.out scrutiny.expected - -%compile% scrutiny-tests-2.scm -A -verbose 2>scrutiny-2.out +%compile% scrutiny-tests-2.scm -A 2>scrutiny-2.out +if errorlevel 1 exit /b 1 +%compile% specialization-tests.scm -A -specialize 2>specialization.out if errorlevel 1 exit /b 1 -%compile% test-scrutinizer-message-format.scm -A -verbose 2>scrutinizer-message-format.out -rem this is expected to fail, so no errorlevel check -fc /lb%FCBUFSIZE% /w scrutinizer-message-format.expected scrutinizer-message-format.out +rem Replace foo123 -> fooXX so gensyms don't trigger failures +%compile% redact-gensyms.scm -o redact-gensyms if errorlevel 1 exit /b 1 -fc /lb%FCBUFSIZE% /w scrutiny.expected scrutiny.out +redact-gensyms "tmp,g,scm:,a,b" < scrutinizer-message-format.out > scrutinizer-message-format.redacted +if errorlevel 1 exit /b 1 +redact-gensyms < scrutiny-2.out > scrutiny-2.redacted +if errorlevel 1 exit /b 1 +redact-gensyms < scrutiny.out > scrutiny.redacted +if errorlevel 1 exit /b 1 +redact-gensyms < specialization.out > specialization.redacted if errorlevel 1 exit /b 1 -if not exist scrutiny-2.expected copy /Y scrutiny-2.out scrutiny-2.expected - -fc /lb%FCBUFSIZE% /w scrutiny-2.expected scrutiny-2.out +fc /lb%FCBUFSIZE% /w scrutinizer-message-format.expected scrutinizer-message-format.redacted +if errorlevel 1 exit /b 1 +fc /lb%FCBUFSIZE% /w scrutiny.expected scrutiny.redacted +if errorlevel 1 exit /b 1 +fc /lb%FCBUFSIZE% /w scrutiny-2.expected scrutiny-2.redacted +if errorlevel 1 exit /b 1 +fc /lb%FCBUFSIZE% /w specialization.expected specialization.redacted if errorlevel 1 exit /b 1 %compile% scrutiny-tests-3.scm -specialize -block diff --git a/tests/runtests.sh b/tests/runtests.sh index c6f9252e..bd8063c9 100755 --- a/tests/runtests.sh +++ b/tests/runtests.sh @@ -112,30 +112,22 @@ $compile scrutinizer-tests.scm -analyze-only $compile typematch-tests.scm -specialize -no-warnings ./a.out -$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 +$compile test-scrutinizer-message-format.scm -A 2>scrutinizer-message-format.out || true +$compile scrutiny-tests.scm -A 2>scrutiny.out +$compile scrutiny-tests-2.scm -A 2>scrutiny-2.out +$compile specialization-tests.scm -A -specialize 2>specialization.out + +# Replace foo123 -> fooXX so gensyms don't trigger failures +$compile redact-gensyms.scm -o 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.expected scrutiny.redacted +diff $DIFF_OPTS scrutiny-2.expected scrutiny-2.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 9c7299f7..4c8fcc89 100644 --- a/tests/scrutinizer-message-format.expected +++ b/tests/scrutinizer-message-format.expected @@ -1,22 +1,24 @@ +;; 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-proc-call-argument-value-count': - expected a single result in `let' binding of `g28', but received zero results + expected a single result in `let' binding of `gXXX', but received zero results Warning: in toplevel procedure `r-cond-branch-value-count-mismatch': branches in conditional expression differ in the number of results: @@ -27,10 +29,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: @@ -67,13 +69,13 @@ Warning: at toplevel: assignment of value of type `fixnum' to toplevel variable `foo' does not match declared type `boolean' Warning: in toplevel procedure `list-ref-negative-index': - (test-scrutinizer-message-format.scm:26) 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 toplevel procedure `list-ref-out-of-range': - (test-scrutinizer-message-format.scm:27) 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 toplevel procedure `vector-ref-out-of-range': - (test-scrutinizer-message-format.scm:29) 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 Warning: in toplevel procedure `zero-values-for-let': expected a single result in `let' binding of `a', but received zero results @@ -88,34 +90,34 @@ Warning: in toplevel procedure `multiple-values-for-conditional': expected a single result in conditional, but received 2 results Note: in toplevel procedure `multiple-values-for-conditional': - (test-scrutinizer-message-format.scm:33) 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#values 1 2) 1 (##core#undefined)) 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:52) 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:53) 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 local procedure `r-proc-call-argument-value-count', in local procedure `local-bar', in toplevel procedure `m#toplevel-foo': - (test-scrutinizer-message-format.scm:54) 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:54) 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-proc-call-argument-value-count', in local procedure `local-bar', in toplevel procedure `m#toplevel-foo': - expected a single result in `let' binding of `g90', but received zero results + expected a single result in `let' binding of `gXXX', but received zero results Warning: in local procedure `r-cond-branch-value-count-mismatch', in local procedure `local-bar', @@ -132,17 +134,17 @@ Warning: in local procedure `r-invalid-called-procedure-type', 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:57) 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:58) 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:59) 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)) @@ -191,17 +193,17 @@ Warning: in local procedure `r-deprecated-identifier', Warning: in local procedure `list-ref-negative-index', in local procedure `local-bar', in toplevel procedure `m#toplevel-foo': - (test-scrutinizer-message-format.scm:67) 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 `local-bar', in toplevel procedure `m#toplevel-foo': - (test-scrutinizer-message-format.scm:68) 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 `local-bar', in toplevel procedure `m#toplevel-foo': - (test-scrutinizer-message-format.scm:70) 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 Warning: in local procedure `zero-values-for-let', in local procedure `local-bar', @@ -226,13 +228,13 @@ Warning: in local procedure `multiple-values-for-conditional', Note: in local procedure `multiple-values-for-conditional', in local procedure `local-bar', in toplevel procedure `m#toplevel-foo': - (test-scrutinizer-message-format.scm:74) 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#values 1 2) 1 (##core#undefined)) Error: in local procedure `fail-compiler-typecase', in local procedure `local-bar', in toplevel procedure `m#toplevel-foo': - (test-scrutinizer-message-format.scm:76) 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 90582764..79c7ad5b 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 e445ebbb..0bc6a8dd 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 fed76b6b..eff536eb 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.11.0