Skip to content

Commit 7854c19

Browse files
committed
Remove error message TODOs
1 parent 7ddfc67 commit 7854c19

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

src/arr/trove/error.arr

-2
Original file line numberDiff line numberDiff line change
@@ -2472,7 +2472,6 @@ data RuntimeError:
24722472
end
24732473
end
24742474
| incompatible-units(reason, u, v) with:
2475-
# TODO Fix spacing in render-fancy-reason (and maybe render-reason)
24762475
method render-fancy-reason(self, maybe-stack-loc, src-available, maybe-ast) block:
24772476
base-err-msg = [ED.para:
24782477
ED.text("The units "),
@@ -2550,7 +2549,6 @@ data RuntimeError:
25502549
base-err-msg])]
25512550
end
25522551
| invalid-unit-state(opname, n, desc) with:
2553-
# TODO: update
25542552
method render-fancy-reason(self, maybe-stack-loc, src-available, maybe-ast):
25552553
[ED.error:
25562554
cases(O.Option) maybe-stack-loc(0, false):

tests/pyret/main2.arr

-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#|
21
import file("./tests/test-strings.arr") as _
32
import file("./tests/test-format.arr") as _
43
import file("./tests/test-numbers.arr") as _
@@ -42,5 +41,4 @@ import file("./tests/test-tail-call.arr") as _
4241
import file("./tests/test-parse.arr") as _
4342
import file("./tests/test-parse-errors.arr") as _
4443
import file("./tests/test-flatness.arr") as _
45-
|#
4644
import file("./tests/test-units.arr") as _

tests/pyret/tests/test-units.arr

+5-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ fun is-unit-contract-fail(result):
55
C.is-fail(result) and C.is-failure-at-arg(result.reason) and C.is-unit-fail(result.reason.reason)
66
end
77

8-
#|
98

109
check "Unit equality":
1110
2 == 2%<m> is false
@@ -28,6 +27,11 @@ check "Unit equality":
2827
(10%<m> / 1%<m>) + 1 is 11
2928

3029
0%<s> == 0%<m> is false
30+
31+
2%<m> =~ 2%<m> is true
32+
2%<m> =~ 2%<s> is false
33+
2%<m> <=> 2%<m> is true
34+
2%<m> <=> 2%<s> is false
3135
end
3236

3337
check "Arithmetic binops":
@@ -164,7 +168,6 @@ check "Units with bigint powers":
164168

165169
num-sqrt(num-sqrt(num-sqrt(num-sqr(num-sqr(num-sqr(1%<u ^ 10000000000000001>)))))) is 1%<u ^ 10000000000000001>
166170
end
167-
|#
168171

169172
check "Within builtins":
170173
within(2%<m>) raises-satisfies is-unit-contract-fail

0 commit comments

Comments
 (0)