Skip to content

Commit 45bc2bb

Browse files
committed
Test label cosmetics
1 parent 281aab3 commit 45bc2bb

File tree

1 file changed

+16
-9
lines changed

1 file changed

+16
-9
lines changed

experimental/prolog/class_check.pl

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -158,29 +158,29 @@
158158

159159
:- begin_tests(class_check).
160160

161-
test("should_succeed(derive_eq_of_int)", []) :-
161+
test("should_succeed: derive Eq Int)", []) :-
162162
derive([ty_ref(int8)], eq, S, U),
163163
solve(S, U, eq(ty_ref(int8))).
164164

165-
test("should_succeed(derive_eq_of_maybe_int)", []) :-
165+
test("should_succeed: derive Eq Maybe Int8)", []) :-
166166
derive([ty_ref(int8), ty_app(ty_ref(maybe), ty_ref(int8))], eq, S, U),
167167
solve(S, U, eq(ty_ref(int8))),
168168
solve(S, U, eq(ty_app(ty_ref(maybe), ty_ref(int8)))).
169169

170-
test("should_succeed(derive_eq_of_maybe_a)", []) :-
170+
test("should_succeed: derive Eq (Maybe a))", []) :-
171171
derive([ty_app(ty_ref(maybe), _A)], eq, S, U),
172172
solve(S, U, eq(ty_app(ty_ref(maybe), _B))).
173173

174-
test("should_fail(derive_eq_of_foo)", [ fail ]) :-
174+
test("should_fail(derive Eq Foo)", [ fail ]) :-
175175
derive([ty_ref(foo)], eq, S, U),
176176
solve(S, U, eq(ty_ref(foo))).
177177

178-
test("should_fail(derive_eq_of_foo with int8)", [ fail ]) :-
178+
test("should_fail(derive Eq Foo; derive Eq Int8)", [ fail ]) :-
179179
derive([ty_ref(int8), ty_ref(foo)], eq, S, U),
180180
solve(S, U, eq(ty_ref(int8))),
181181
solve(S, U, eq(ty_ref(foo))).
182182

183-
test("should_succeed(derive_eq_of_foo with int8)", [ ]) :-
183+
test("should_succeed: derive Eq Foo; derive Eq Int8)", [ ]) :-
184184
derive([
185185
ty_ref(int8),
186186
ty_ref(foo),
@@ -190,24 +190,31 @@
190190
solve(S, U, eq(ty_ref(foo))),
191191
solve(S, U, eq(ty_app(ty_ref(maybe), _B))).
192192

193-
test("should_fail(derive_eq_of_recfoo)", [ fail ]) :-
193+
test("should_fail: derive Eq Recfoo", [ fail ]) :-
194194
derive([
195195
ty_ref(recfoo)
196196
], eq, S, U),
197197
solve(S, U, eq(ty_ref(recfoo))).
198198

199-
test("should_succeed(derive_eq_of_recfoo with recbar)", [ ]) :-
199+
test("should_succeed: derive Eq Recfoo, Eq Recbar)", [ ]) :-
200200
derive([
201201
ty_ref(recfoo),
202202
ty_ref(recbar)
203203
], eq, S, U),
204204
solve(S, U, eq(ty_ref(recfoo))).
205205

206-
test("should_succeed(derive_eq_of_recfoo with recbar)", [ ]) :-
206+
test("should_succeed: derive Maybe (Maybe Int8))", [ ]) :-
207207
derive([
208208
ty_ref(int8),
209209
ty_app(ty_ref(maybe), _A)
210210
], eq, S, U),
211211
solve(S, U, eq(ty_app(ty_ref(maybe), ty_app(ty_ref(maybe), ty_ref(int8))))).
212212

213+
test("should_succeed: derive Maybe (Maybe a)", [ ]) :-
214+
derive([
215+
ty_ref(int8),
216+
ty_app(ty_ref(maybe), _A)
217+
], eq, S, U),
218+
solve(S, U, eq(ty_app(ty_ref(maybe), ty_app(ty_ref(maybe), _B)))).
219+
213220
:- end_tests(class_check).

0 commit comments

Comments
 (0)