make copySign for js consistent with other backends (#16609)

* make copySign work more robustly in js
* improve tests
* improve tests/vm/tcastint.nim
This commit is contained in:
Timothee Cour 2021-02-21 23:47:00 -08:00 • committed by GitHub
commit cde950e1bc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 48 additions and 44 deletions

View file

@ -1,7 +1,3 @@
discard """
output: "OK"
"""
import macros
type
@ -292,16 +288,12 @@ proc test_float32_castB() =
# any surprising content.
doAssert cast[uint64](c) == 3270918144'u64
test()
test_float_cast()
test_float32_cast()
free_integer_casting()
test_float32_castB()
static:
template main() =
test()
test_float_cast()
test_float32_cast()
free_integer_casting()
test_float32_castB()
echo "OK"
static: main()
main()