We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8e9c83f commit e9babe3Copy full SHA for e9babe3
tests/magics/tmagics.nim
@@ -68,4 +68,20 @@ block wrong_finished_result:
68
# placing the ``finished`` call within the assertion made the test work
69
doAssert f
70
71
- test()
+ test()
72
+
73
+block bool_comparison:
74
+ # tests for the boolean less-than and less-than-or-equal operators
75
+ let t = true
76
+ let f = false
77
78
+ doAssert t > f # 'true' is greater than 'false'
79
+ doAssert f < t
80
+ doAssert not (t > t) # 'true' is not greater or less than itself
81
+ doAssert not (t < t)
82
+ doAssert not (f > f) # 'false' is not greater or less than itself
83
+ doAssert not (f < f)
84
+ doAssert t >= t
85
+ doAssert t <= t
86
+ doAssert f >= f
87
+ doAssert f <= f
0 commit comments