Skip to content

Commit

Permalink
tests: update the tmacrostmt test
Browse files Browse the repository at this point in the history
  • Loading branch information
zerbina committed Oct 18, 2024
1 parent 60e9aab commit d1dda9d
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions tests/lang_callable/macros/tmacrostmt.nim
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,6 @@ proc fn6() =

#------------------------------------
# bug #10807
proc fn_unsafeaddr(x: int): int =
cast[int](unsafeAddr(x))

static:
let fn1s = "proc fn1(x, y: int): int =\n result = 2 * (x + y)\n"
Expand All @@ -124,15 +122,13 @@ static:
let fn4s = "proc fn4(x: int): int =\n if x mod 2 == 0:\n return x + 2\n else:\n return 0\n"
let fn5s = "proc fn5(a, b: float): float =\n result = -a * a / (b * b)\n"
let fn6s = "proc fn6() =\n var a = @[1.0, 2.0]\n let z = a{0, 1}\n a{2} = 5.0\n"
let fnAddr = "proc fn_unsafeaddr(x: int): int =\n result = cast[int](unsafeAddr(x))\n"

doAssert fn1.repr_to_string == fn1s
doAssert fn2.repr_to_string == fn2s
doAssert fn3.repr_to_string == fn3s
doAssert fn4.repr_to_string == fn4s
doAssert fn5.repr_to_string == fn5s
doAssert fn6.repr_to_string == fn6s
doAssert fn_unsafeaddr.repr_to_string == fnAddr

#------------------------------------
# bug #8763
Expand Down

0 comments on commit d1dda9d

Please sign in to comment.