adding test for whalesong base as well
This commit is contained in:
parent
a13274d63b
commit
1939e02553
2
tests/more-tests/cont-marks-2.expected
Normal file
2
tests/more-tests/cont-marks-2.expected
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
()
|
||||||
|
(3628800)
|
13
tests/more-tests/cont-marks-2.rkt
Normal file
13
tests/more-tests/cont-marks-2.rkt
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
#lang planet dyoo/whalesong/base
|
||||||
|
|
||||||
|
(define (puzzle n)
|
||||||
|
(if (= n 0)
|
||||||
|
(continuation-mark-set->list (current-continuation-marks) 'secret)
|
||||||
|
(with-continuation-mark 'secret
|
||||||
|
(* n (first (continuation-mark-set->list (current-continuation-marks) 'secret)))
|
||||||
|
(puzzle (sub1 n)))))
|
||||||
|
|
||||||
|
(continuation-mark-set->list (current-continuation-marks) 'secret)
|
||||||
|
|
||||||
|
(with-continuation-mark 'secret 1
|
||||||
|
(puzzle 10))
|
5
tests/more-tests/fact.expected
Normal file
5
tests/more-tests/fact.expected
Normal file
File diff suppressed because one or more lines are too long
12
tests/more-tests/fact.rkt
Normal file
12
tests/more-tests/fact.rkt
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
#lang planet dyoo/whalesong
|
||||||
|
(define (fact x)
|
||||||
|
(cond
|
||||||
|
[(= x 0)
|
||||||
|
1]
|
||||||
|
[else
|
||||||
|
(* x (fact (sub1 x)))]))
|
||||||
|
(fact 1)
|
||||||
|
(fact 10)
|
||||||
|
(fact 100)
|
||||||
|
(fact 1000)
|
||||||
|
(fact 10000)
|
|
@ -17,6 +17,7 @@
|
||||||
(test "more-tests/printing.rkt")
|
(test "more-tests/printing.rkt")
|
||||||
(test "more-tests/simple-functions.rkt")
|
(test "more-tests/simple-functions.rkt")
|
||||||
(test "more-tests/cont-marks-1.rkt")
|
(test "more-tests/cont-marks-1.rkt")
|
||||||
|
(test "more-tests/cont-marks-2.rkt")
|
||||||
(test "more-tests/map.rkt")
|
(test "more-tests/map.rkt")
|
||||||
(test "more-tests/quasi.rkt")
|
(test "more-tests/quasi.rkt")
|
||||||
(test "more-tests/sk-generator.rkt")
|
(test "more-tests/sk-generator.rkt")
|
||||||
|
|
|
@ -7,4 +7,4 @@
|
||||||
(provide version)
|
(provide version)
|
||||||
(: version String)
|
(: version String)
|
||||||
|
|
||||||
(define version "1.135")
|
(define version "1.137")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user