Nim/tests/stdlib/concurrency/tatomics_size.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

19 lines
No EOL
412 B
Nim

discard """
targets: "c cpp"
"""
import std/atomics
import std/assertions
block testSize: # issue 12726
type
Node = ptr object
# works
next: Atomic[pointer]
f:AtomicFlag
MyChannel = object
# type not defined completely
back: Atomic[ptr int]
f: AtomicFlag
static:
doAssert sizeof(Node) == sizeof(pointer)
doAssert sizeof(MyChannel) == sizeof(pointer) * 2