diff --git a/tests/misc/tnegativezero.nim b/tests/misc/tnegativezero.nim deleted file mode 100644 index a443e40cf8875..0000000000000 --- a/tests/misc/tnegativezero.nim +++ /dev/null @@ -1,30 +0,0 @@ -discard """ - targets: "c cpp js" -""" - -proc main()= - block: - let a = -0.0 - doAssert $a == "-0.0" - doAssert $(-0.0) == "-0.0" - - block: - let a = 0.0 - when nimvm: discard ## TODO VM print wrong -0.0 - else: - doAssert $a == "0.0" - doAssert $(0.0) == "0.0" - - block: - let b = -0 - doAssert $b == "0" - doAssert $(-0) == "0" - - block: - let b = 0 - doAssert $b == "0" - doAssert $(0) == "0" - - -static: main() -main() diff --git a/tests/system/tdollars.nim b/tests/system/tdollars.nim index 6ddec911fc634..1b2602ad001cc 100644 --- a/tests/system/tdollars.nim +++ b/tests/system/tdollars.nim @@ -77,3 +77,29 @@ block: # #14350 for JS doAssert cstr == nil doAssert cstr.isNil doAssert cstr != cstring("") + + +proc main()= + block: + let a = -0.0 + doAssert $a == "-0.0" + doAssert $(-0.0) == "-0.0" + + block: + let a = 0.0 + doAssert $a == "0.0" + doAssert $(0.0) == "0.0" + + block: + let b = -0 + doAssert $b == "0" + doAssert $(-0) == "0" + + block: + let b = 0 + doAssert $b == "0" + doAssert $(0) == "0" + + +static: main() +main()