Using define-test procedures with arguments inside test/case
constructs seems to terminate in rather unexpected fashion; that is,
the first such call ends the test/case. See attached code and
output.
-Robin
--
Lojban Reason #17: http://en.wikipedia.org/wiki/Buffalo_buffalo
Proud Supporter of the Singularity Institute - http://singinst.org/
http://www.digitalkingdom.org/~rlpowell/ *** http://www.lojban.org/
(use testbase testbase-output-compact testbase-output-human
testbase-output-html testbase-output-minimal)
(define-test
(my-test arg)
"My Test"
(test/case
(conc "My Test: " arg)
(expect-eq 'baz 'baz)))
(define-test
(my-test2 arg)
"My Test 2"
(test/case
(conc "My Test 2: " arg)
(expect-eq 'weeble 'weeble)))
(define-test
basic-test
"Stuff"
(test/case
"More Stuff"
(expect-eq 'qux 'qux)
(my-test 'foo)
(expect-eq 'qux 'qux)
(my-test 'bar)
(expect-eq 'qux 'qux))
(test/case
"More Stuff2"
(expect-eq 'qux 'qux)
(my-test2 'foo)
(expect-eq 'qux 'qux)
(my-test2 'bar)
(expect-eq 'qux 'qux))
(my-test 'foo)
(my-test 'bar)
)
(test::for-each (cut test::styler-set! <> test::output-style-human))
(run-test "Some Testing")
** Running Some Testing **
Test Suite: Stuff
Test Case: More Stuff
Expectation:
Expect eq
Expected: qux
Unevaluated: (quote qux)
Evaluated: qux
Passed:
Test Suite: My Test:
Test Case: My Test: foo
Expectation:
Expect eq
Expected: baz
Unevaluated: (quote baz)
Evaluated: baz
Passed:
Passed: My Test: foo
Passed: My Test:
Passed: More Stuff
Test Case: More Stuff2
Expectation:
Expect eq
Expected: qux
Unevaluated: (quote qux)
Evaluated: qux
Passed:
Test Suite: My Test 2:
Test Case: My Test 2: foo
Expectation:
Expect eq
Expected: weeble
Unevaluated: (quote weeble)
Evaluated: weeble
Passed:
Passed: My Test 2: foo
Passed: My Test 2:
Passed: More Stuff2
Test Suite: My Test:
Test Case: My Test: foo
Expectation:
Expect eq
Expected: baz
Unevaluated: (quote baz)
Evaluated: baz
Passed:
Passed: My Test: foo
Passed: My Test:
Test Suite: My Test:
Test Case: My Test: bar
Expectation:
Expect eq
Expected: baz
Unevaluated: (quote baz)
Evaluated: baz
Passed:
Passed: My Test: bar
Passed: My Test:
Passed: Stuff
ALL TESTS SUCCESSFUL!
** Passed Some Testing **
_______________________________________________
Chicken-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/chicken-users