Skip to content

Commit d1c67be

Browse files
committed
test(tower): fix examplar paths, chaff 3
1 parent a31982f commit d1c67be

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

tests/examples/tower-grading/num-rooms/chaff-3.arr

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ fun num-rooms(building :: Building) -> Number:
44
| story(_, above-rooms, _, below) =>
55
cases(Building) below:
66
| ground => above-rooms
7-
| story(_, below-rooms, _ shadow below) =>
8-
num-rooms(below-rooms, below)
7+
| story(_, below-rooms, _, shadow below) =>
8+
below-rooms + num-rooms(below)
9+
end
910
end
1011
end

tests/integration/inspect-tower.arr

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ fun mk-examplar(fn, num, dep, path, constr, typ):
3434
suff = num-to-string(i + 1)
3535
constr(
3636
fn + "-" + typ + "-" + suff, [list: dep], path,
37-
P.example("tower-grading/" + fn + "-" + typ + "-" + suff + ".arr"),
37+
P.example("tower-grading/" + fn + "/" + typ + "-" + suff + ".arr"),
3838
fn, points
3939
)
4040
end,
@@ -79,7 +79,7 @@ fun build-graders(path :: String):
7979
+ test-design-recipe-for({
8080
fn: "num-rooms", arity: 1,
8181
min-in: 4, min-out: 3,
82-
wheats: 2, chaffs: 2
82+
wheats: 2, chaffs: 3
8383
}, [list: "tw"], path)
8484
+ test-design-recipe-for({
8585
fn: "max-rooms", arity: 1,
@@ -102,5 +102,10 @@ graders = build-graders(P.example("tower.arr"))
102102

103103
# FIXME: nested modules not working
104104
# debugging.wait-for-debugger()
105-
inspect-grade(graders, false, false)
105+
result = inspect-grade(graders, false, false)
106+
107+
check "aggregate-to-flat smoke":
108+
grading-helpers.aggregate-to-flat(result.aggregated) does-not-raise
109+
end
110+
106111

0 commit comments

Comments
 (0)