Continue bool conversion fixing (#13751)

* continue fixing #13744

* improve style

* improve test

Co-authored-by: cooldome <ariabushenko@bk.ru>
This commit is contained in:
cooldome 2020-03-25 20:36:22 +00:00 • committed by GitHub
commit 764a81ca25
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 20 additions and 2 deletions

View file

@ -52,5 +52,12 @@ proc test_conv_to_bool =
static:
doAssert(bool(0) == false)
doAssert(bool(-1) == true)
doAssert(bool(2) == true)
doAssert(bool(NaN) == true)
doAssert(bool(0.0) == false)
doAssert(bool(-0.0) == false)
test_conv_to_bool()
test_conv_to_bool()
test_conv_to_bool()