mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-28 02:03:59 +00:00
Continue bool conversion fixing (#13751)
* continue fixing #13744 * improve style * improve test Co-authored-by: cooldome <ariabushenko@bk.ru>
This commit is contained in:
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user