Fix tc-if. Remove dead cases and misuse of expected.
This commit is contained in:
parent
750e408d94
commit
cf713b7030
|
@ -99,12 +99,6 @@
|
||||||
(ret us fs3 os3)]
|
(ret us fs3 os3)]
|
||||||
;; otherwise, error
|
;; otherwise, error
|
||||||
[else
|
[else
|
||||||
(tc-error/expr #:return (or expected (ret Err))
|
(tc-error/expr #:return (ret -Bottom)
|
||||||
"Expected the same number of values from both branches of `if' expression, but got ~a and ~a"
|
"Expected the same number of values from both branches of `if' expression, but got ~a and ~a"
|
||||||
(length ts) (length us))])])))]
|
(length ts) (length us))])])))]))
|
||||||
[(tc-any-results:)
|
|
||||||
(tc-error/expr #:return (or expected (ret Err))
|
|
||||||
"Test expression expects one value, given unknown amount")]
|
|
||||||
[(tc-results: t _ _)
|
|
||||||
(tc-error/expr #:return (or expected (ret Err))
|
|
||||||
"Test expression expects one value, given ~a" t)]))
|
|
||||||
|
|
|
@ -2617,6 +2617,11 @@
|
||||||
#:ret (ret (-val 'x))
|
#:ret (ret (-val 'x))
|
||||||
#:expected (ret (-val 'x) -no-filter -no-obj)]
|
#:expected (ret (-val 'x) -no-filter -no-obj)]
|
||||||
|
|
||||||
|
[tc-err (if (random) (values 1 2) 3)
|
||||||
|
#:ret (ret (-val 3) -top-filter)
|
||||||
|
#:expected (ret (-val 3) -no-filter -no-obj)]
|
||||||
|
|
||||||
|
|
||||||
)
|
)
|
||||||
(test-suite
|
(test-suite
|
||||||
"tc-literal tests"
|
"tc-literal tests"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user