Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Dan Holtby
uwaterloo-racket
Commits
c4848f9d
Commit
c4848f9d
authored
Oct 24, 2021
by
Dan Holtby
Browse files
add mutually recursive tests
parent
c4eeaa51
Changes
3
Hide whitespace changes
Inline
Side-by-side
htdp-trace/tests/bsl-test.rkt
View file @
c4848f9d
...
...
@@ -8,3 +8,11 @@
[
else
(
+
(
first
lst
)
(
f
(
rest
lst
)))]))
(
f
(
list
1
2
3
))
(
define/trace
(
h
n
)
(
if
(
zero?
n
)
0
(
g
(
sub1
n
))))
(
define/trace
(
g
n
)
(
if
(
zero?
n
)
0
(
h
(
sub1
n
))))
(
h
3
)
\ No newline at end of file
htdp-trace/tests/isl-test.rkt
View file @
c4848f9d
...
...
@@ -8,3 +8,15 @@
(
cond
[(
empty?
lst
)
0
]
[
else
(
g
(
first
lst
)
(
f
(
rest
lst
)))])))
(
f
(
list
1
2
3
))
(
define
(
mutual
n
)
(
local
[(
define/trace
(
f
n
)
(
if
(
zero?
n
)
0
(
g
(
sub1
n
))))
(
define/trace
(
g
n
)
(
if
(
zero?
n
)
0
(
f
(
sub1
n
))))]
(
f
n
)))
(
mutual
3
)
\ No newline at end of file
htdp-trace/tests/main.rkt
View file @
c4848f9d
...
...
@@ -17,6 +17,12 @@
<
5
<6
6
>
(
h
3
)
>
(
g
2
)
>
(
h
1
)
>
(
g
0
)
<0
0
EXPECTED
)
...
...
@@ -38,6 +44,12 @@ EXPECTED
>
(
g
1
5
)
<6
6
>
(
f
3
)
>
(
g
2
)
>
(
f
1
)
>
(
g
0
)
<0
0
EXPECTED
)
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment