~ chicken-core (chicken-5) 6aca79676702b856f462a9416b365848eeb6dad1
commit 6aca79676702b856f462a9416b365848eeb6dad1 Author: felix <felix@call-with-current-continuation.org> AuthorDate: Fri May 20 08:54:17 2011 +0200 Commit: felix <felix@call-with-current-continuation.org> CommitDate: Fri May 20 08:54:17 2011 +0200 updated scrutiny test file; scrutiny-2 output is diffed as well diff --git a/tests/runtests.sh b/tests/runtests.sh index c9bed5d6..f9178671 100644 --- a/tests/runtests.sh +++ b/tests/runtests.sh @@ -83,9 +83,20 @@ fi diff -bu scrutiny.expected scrutiny.out -$compile scrutiny-tests-2.scm -scrutinize -analyze-only -ignore-repository -types ../types.db +$compile scrutiny-tests-2.scm -scrutinize -analyze-only -ignore-repository -types ../types.db 2>scrutiny-2.out ./a.out +if test -n "$MSYSTEM"; then + dos2unix scrutiny.out +fi + +# this is sensitive to gensym-names, so make it optional +if test \! -f scrutiny-2.expected; then + cp scrutiny-2.out scrutiny-2.expected +fi + +diff -bu scrutiny-2.expected scrutiny-2.out + echo "======================================== specialization tests ..." rm -f foo.types foo.import.* $compile specialization-test-1.scm -emit-type-file foo.types -specialize \ diff --git a/tests/scrutiny-2.expected b/tests/scrutiny-2.expected new file mode 100644 index 00000000..8223e9ce --- /dev/null +++ b/tests/scrutiny-2.expected @@ -0,0 +1,69 @@ + +Warning: at toplevel: + pair?: in procedure call to `pair?', the predicate is called with an argument of type `pair' and will always return true + +Warning: at toplevel: + pair?: in procedure call to `pair?', the predicate is called with an argument of type `null' and will always return false + +Warning: at toplevel: + pair?: in procedure call to `pair?', the predicate is called with an argument of type `fixnum' and will always return false + +Warning: at toplevel: + pair?: in procedure call to `pair?', the predicate is called with an argument of type `float' and will always return false + +Warning: at toplevel: + list?: in procedure call to `list?', the predicate is called with an argument of type `list' and will always return true + +Warning: at toplevel: + list?: in procedure call to `list?', the predicate is called with an argument of type `fixnum' and will always return false + +Warning: at toplevel: + list?: in procedure call to `list?', the predicate is called with an argument of type `float' and will always return false + +Warning: at toplevel: + null?: in procedure call to `null?', the predicate is called with an argument of type `null' and will always return true + +Warning: at toplevel: + null?: in procedure call to `null?', the predicate is called with an argument of type `pair' and will always return false + +Warning: at toplevel: + null?: in procedure call to `null?', the predicate is called with an argument of type `fixnum' and will always return false + +Warning: at toplevel: + null?: in procedure call to `null?', the predicate is called with an argument of type `float' and will always return false + +Warning: at toplevel: + fixnum?: in procedure call to `fixnum?', the predicate is called with an argument of type `fixnum' and will always return true + +Warning: at toplevel: + fixnum?: in procedure call to `fixnum?', the predicate is called with an argument of type `float' and will always return false + +Warning: at toplevel: + exact?: in procedure call to `exact?', the predicate is called with an argument of type `fixnum' and will always return true + +Warning: at toplevel: + exact?: in procedure call to `exact?', the predicate is called with an argument of type `float' and will always return false + +Warning: at toplevel: + flonum?: in procedure call to `flonum?', the predicate is called with an argument of type `float' and will always return true + +Warning: at toplevel: + flonum?: in procedure call to `flonum?', the predicate is called with an argument of type `fixnum' and will always return false + +Warning: at toplevel: + inexact?: in procedure call to `inexact?', the predicate is called with an argument of type `float' and will always return true + +Warning: at toplevel: + inexact?: in procedure call to `inexact?', the predicate is called with an argument of type `fixnum' and will always return false + +Warning: at toplevel: + number?: in procedure call to `number?', the predicate is called with an argument of type `fixnum' and will always return true + +Warning: at toplevel: + number?: in procedure call to `number?', the predicate is called with an argument of type `float' and will always return true + +Warning: at toplevel: + number?: in procedure call to `number?', the predicate is called with an argument of type `number' and will always return true + +Warning: at toplevel: + number?: in procedure call to `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 d919b18b..893c0e96 100644 --- a/tests/scrutiny.expected +++ b/tests/scrutiny.expected @@ -13,7 +13,7 @@ type `number' which is always true: Warning: in toplevel procedure `foo': branches in conditional expression differ in the number of results: -(if x5 (values '1 '2) (values '1 '2 (+ ...))) +(if x5 (values '1 '2) (values '1 '2 (+ (+ ...)))) Warning: at toplevel: scrutiny-tests.scm:18: in procedure call to `bar6', expected argument #2 of type `number', but was given an argument of type `symbol' @@ -45,4 +45,19 @@ Warning: at toplevel: Warning: at toplevel: g89: in procedure call to `g89', expected a value of type `(procedure () *)', but was given a value of type `fixnum' +Warning: in toplevel procedure `foo2': + scrutiny-tests.scm:57: in procedure call to `string-append', expected argument #1 of type `string', but was given an argument of type `number' + +Warning: at toplevel: + scrutiny-tests.scm:65: 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:70: in procedure call to `+', expected argument #1 of type `number', but was given an argument of type `string' + +Warning: in toplevel procedure `foo5': + scrutiny-tests.scm:76: in procedure call to `+', expected argument #1 of type `number', but was given an argument of type `string' + +Warning: in toplevel procedure `foo6': + scrutiny-tests.scm:82: in procedure call to `+', expected argument #1 of type `number', but was given an argument of type `string' + Warning: redefinition of standard binding: carTrap