Skip to content

Commit 07497e4

Browse files
committed
Remove print debugging statement, add test.
1 parent c0f5f0b commit 07497e4

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/maybe/maybe.nim

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ macro maybeCase*[T](m : Maybe[T], body : untyped) : untyped =
101101
ifExpr.add(newNimNode(nnkElseExpr).add(nothingClause))
102102

103103
result = ifExpr
104-
echo treeRepr(result)
105104

106105
proc `$`*[T](m: Maybe[T]) : string =
107106
## Convert a maybe instance to a string.

src/tests/basic.nim

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ proc testBasic() =
2121
just aInner:
2222
assert aInner == 10, "Value in 'a' should be 10"
2323
assert a.valid, "'a' should only be valid in this clause"
24+
aInner = 15
25+
2426
nothing:
2527
assert false, "This clause should be unreachable"
2628

@@ -36,6 +38,8 @@ proc testBasic() =
3638
assert false, "This clause should be unreachable"
3739
nothing:
3840
assert c.valid == false, "'c' should only be invalid in this clause"
41+
42+
assert $a == "Just 15"
3943

4044
type Temp = enum
4145
VHot, Hot, Med, Cold, VCold

0 commit comments

Comments
 (0)