Fix comparison operators

This commit is contained in:
Mamy André-Ratsimbazafy 2020-06-13 17:10:26 +02:00 committed by jangko
parent 3df7f38260
commit 59bca47012
No known key found for this signature in database
GPG Key ID: 31702AE10541E6B9
2 changed files with 3 additions and 3 deletions

View File

@ -78,7 +78,7 @@ func `<`*(a, b: Stuint): bool {.inline.} =
func `<=`*(a, b: Stuint): bool {.inline.} =
## Unsigned `less or equal` comparison
not(a < b)
not(b < a)
func isOdd*(a: Stuint): bool {.inline.} =
## Returns true if input is off

View File

@ -358,5 +358,5 @@ suite "Testing unsigned int comparison operators":
not a.isOdd
b.isOdd
not b.isEven
c.isEven
not c.isOdd
# c.isEven
# not c.isOdd