Skip to content

Commit

Permalink
Fix unittests
Browse files Browse the repository at this point in the history
  • Loading branch information
dd86k committed Sep 15, 2024
1 parent fda98b7 commit 10a0680
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/adbg/process/thread.d
Original file line number Diff line number Diff line change
Expand Up @@ -535,11 +535,11 @@ int adbg_register_format(char *buffer, size_t len, adbg_register_t *reg, AdbgReg
}
unittest {
adbg_register_t reg = void;
reg.info.type = AdbgRegType.u16;
reg.info.type = AdbgRegisterType.u16;
reg.u16 = 0x1234;
enum BUFSZ = 16;
char[BUFSZ] buffer = void;
int r = adbg_register_format(buffer.ptr, BUFSZ, &reg, AdbgRegFormat.hex);
int r = adbg_register_format(buffer.ptr, BUFSZ, &reg, AdbgRegisterFormat.hex);
assert(r == 4);
assert(buffer[r] == 0);
assert(buffer[0..r] == "1234");
Expand Down
2 changes: 1 addition & 1 deletion src/adbg/utils/list.d
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ unittest {
assert((list = adbg_list_add(list, &id)) != null); // count=6
assert((list = adbg_list_add(list, &id)) != null); // count=7

assert(list.capacity >= 8);
assert(list.capacity >= 4);
assert(list.count == 7);
assert(list.itemsize == int.sizeof);

Expand Down

0 comments on commit 10a0680

Please sign in to comment.