Files
Nim/tests/stdlib/tmemory.nim
ringabout 3d2f0e2c7c make more standard libraries work with nimPreviewSlimSystem (#20343)
* make more standard libraries work with `nimPreviewSlimSystem`

* typo

* part two

* Delete specutils.nim

* fixes more tests

* more fixes

* fixes tests

* fixes three more tests

* add formatfloat import

* fix

* last
2022-09-27 20:06:23 +02:00

17 lines
317 B
Nim

import std/assertions
block: # cmpMem
type
SomeHash = array[15, byte]
var
a: SomeHash
b: SomeHash
a[^1] = byte(1)
let c = a
doAssert cmpMem(a.addr, b.addr, sizeof(SomeHash)) > 0
doAssert cmpMem(b.addr, a.addr, sizeof(SomeHash)) < 0
doAssert cmpMem(a.addr, c.addr, sizeof(SomeHash)) == 0