Skip to content

Commit

Permalink
Fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Schamper committed Aug 29, 2023
1 parent 83db5b7 commit 62e7d6f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tests/test_align.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ def test_align_pointer():
c = cstruct.cstruct(pointer="uint64")
c.load(d, align=True)

assert c.pointer == "uint64"
assert c.pointer is c.uint64

fields = c.test.fields
assert c.test.align
Expand Down
6 changes: 3 additions & 3 deletions tests/test_pointer.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def test_pointer_basic(compiled):
cs.load(cdef, compiled=compiled)

assert verify_compiled(cs.ptrtest, compiled)
assert cs.pointer == "uint16"
assert cs.pointer is cs.uint16

buf = b"\x04\x00\x08\x00\x01\x02\x03\x04\x05\x06\x07\x08"
obj = cs.ptrtest(buf)
Expand Down Expand Up @@ -64,7 +64,7 @@ def test_pointer_struct(compiled):

assert verify_compiled(cs.test, compiled)
assert verify_compiled(cs.ptrtest, compiled)
assert cs.pointer == "uint16"
assert cs.pointer is cs.uint16

buf = b"\x02\x00testt\x00e\x00s\x00t\x00\x01\x02\x03\x04\x05\x06\x07lalala\x00t\x00e\x00s\x00t\x00\x00\x00"
obj = cs.ptrtest(buf)
Expand Down Expand Up @@ -97,7 +97,7 @@ def test_array_of_pointers(compiled):
cs.load(cdef, compiled=compiled)

assert verify_compiled(cs.mainargs, compiled)
assert cs.pointer == "uint16"
assert cs.pointer is cs.uint16

buf = b"\x02\x09\x00\x16\x00\x00\x00\x00\x00argument one\x00argument two\x00"
obj = cs.mainargs(buf)
Expand Down

0 comments on commit 62e7d6f

Please sign in to comment.