- Timestamp:
- 04/11/20 17:25:43 (10 months ago)
- Location:
- release/5/simple-tests
- Files:
-
- 6 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
release/5/simple-tests/tags/2.0.3/simple-tests.egg
r38313 r38612 4 4 (category testing) 5 5 (license "BSD") 6 (version "2.0. 2")6 (version "2.0.3") 7 7 (author "Juergen Lorenz") 8 8 (components (extension simple-tests -
release/5/simple-tests/tags/2.0.3/simple-tests.scm
r38296 r38612 368 368 (args* (cddadr form)) 369 369 (pairs* (cddr form)) 370 (%x (rename 'x)) 370 371 (%tests (rename 'tests)) 371 372 (%writeln (rename 'writeln)) … … 420 421 ,@(map (lambda (p) 421 422 `(,%begin 422 (,%when ,verbose? 423 (,%print "testing " ',(car p) " ...") 424 ;;(,%writeln 'computed ,(car p)) 425 (,%print* "computed: ") (,%writeln ,(car p)) 426 ;;(,%writeln 'expected ,(cadr p)) 427 (,%print* "expected: ") (,%writeln ,(cadr p)) 428 ) 429 (,%set! ,%tests 430 ;(,%cons (,%cons ,(cons %equal? p) ',(car p)) ; ok 431 (,%cons (,%cons ((,%== ,(car p)) ,(cadr p)) ',(car p)) 432 ,%tests)) 433 )) 423 (,%let ((,%x ,(car p))) 424 ; protect against functions changing state 425 (,%when ,verbose? 426 (,%print "testing " ',(car p) " ...") 427 ;(,%print* "computed: ") (,%writeln ,(car p)) 428 (,%print* "computed: ") (,%writeln ,%x) 429 (,%print* "expected: ") (,%writeln ,(cadr p)) 430 ) 431 (,%set! ,%tests 432 ;(,%cons (,%cons ,(cons %equal? p) ',(car p)) ; ok 433 ;(,%cons (,%cons ((,%== ,(car p)) ,(cadr p)) ',(car p)) 434 (,%cons (,%cons ((,%== ,%x) ,(cadr p)) ',(car p)) 435 ,%tests))) 436 )) 434 437 (chop pairs* 2)) 435 438 (,%let ((,%fails (,select-failures (,%reverse ,%tests)))) … … 454 457 (map car (reverse failures))) 455 458 (if (null? failures) 456 ( exit 0)457 ( exit 1)))459 (begin (newline) (exit 0)) 460 (begin (newline) (exit 1)))) 458 461 ((caar pairs) 459 462 (loop (cdr pairs) failures)) … … 477 480 checks))))))) 478 481 ) ; simple-tests 482 -
release/5/simple-tests/tags/2.0.3/tests/run.scm
r38296 r38612 73 73 ) 74 74 75 (check-all SIMPLE (bar?) (*?) (+?) (arithmetic?) (baz?) (qux?)) 75 (define counter 76 (let ((n 0)) 77 (lambda () 78 (set! n (add1 n)) 79 n))) 80 81 (define-checks (counter? verbose?) 82 (counter) 1 83 (counter) 2 84 (counter) 3 85 (counter) 4 86 ) 87 88 89 (check-all SIMPLE (bar?) (*?) (+?) (arithmetic?) (baz?) (qux?) 90 (counter?)) -
release/5/simple-tests/trunk/simple-tests.egg
r38313 r38612 4 4 (category testing) 5 5 (license "BSD") 6 (version "2.0. 2")6 (version "2.0.3") 7 7 (author "Juergen Lorenz") 8 8 (components (extension simple-tests -
release/5/simple-tests/trunk/simple-tests.scm
r38296 r38612 368 368 (args* (cddadr form)) 369 369 (pairs* (cddr form)) 370 (%x (rename 'x)) 370 371 (%tests (rename 'tests)) 371 372 (%writeln (rename 'writeln)) … … 420 421 ,@(map (lambda (p) 421 422 `(,%begin 422 (,%when ,verbose? 423 (,%print "testing " ',(car p) " ...") 424 ;;(,%writeln 'computed ,(car p)) 425 (,%print* "computed: ") (,%writeln ,(car p)) 426 ;;(,%writeln 'expected ,(cadr p)) 427 (,%print* "expected: ") (,%writeln ,(cadr p)) 428 ) 429 (,%set! ,%tests 430 ;(,%cons (,%cons ,(cons %equal? p) ',(car p)) ; ok 431 (,%cons (,%cons ((,%== ,(car p)) ,(cadr p)) ',(car p)) 432 ,%tests)) 433 )) 423 (,%let ((,%x ,(car p))) 424 ; protect against functions changing state 425 (,%when ,verbose? 426 (,%print "testing " ',(car p) " ...") 427 ;(,%print* "computed: ") (,%writeln ,(car p)) 428 (,%print* "computed: ") (,%writeln ,%x) 429 (,%print* "expected: ") (,%writeln ,(cadr p)) 430 ) 431 (,%set! ,%tests 432 ;(,%cons (,%cons ,(cons %equal? p) ',(car p)) ; ok 433 ;(,%cons (,%cons ((,%== ,(car p)) ,(cadr p)) ',(car p)) 434 (,%cons (,%cons ((,%== ,%x) ,(cadr p)) ',(car p)) 435 ,%tests))) 436 )) 434 437 (chop pairs* 2)) 435 438 (,%let ((,%fails (,select-failures (,%reverse ,%tests)))) … … 454 457 (map car (reverse failures))) 455 458 (if (null? failures) 456 ( exit 0)457 ( exit 1)))459 (begin (newline) (exit 0)) 460 (begin (newline) (exit 1)))) 458 461 ((caar pairs) 459 462 (loop (cdr pairs) failures)) … … 477 480 checks))))))) 478 481 ) ; simple-tests 482 -
release/5/simple-tests/trunk/tests/run.scm
r38296 r38612 73 73 ) 74 74 75 (check-all SIMPLE (bar?) (*?) (+?) (arithmetic?) (baz?) (qux?)) 75 (define counter 76 (let ((n 0)) 77 (lambda () 78 (set! n (add1 n)) 79 n))) 80 81 (define-checks (counter? verbose?) 82 (counter) 1 83 (counter) 2 84 (counter) 3 85 (counter) 4 86 ) 87 88 89 (check-all SIMPLE (bar?) (*?) (+?) (arithmetic?) (baz?) (qux?) 90 (counter?))
Note: See TracChangeset
for help on using the changeset viewer.