Skip to content

Commit

Permalink
Poke tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mrmacete committed Jan 19, 2024
1 parent 73d8100 commit ab4453d
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions tests/gumjs/script.c
Original file line number Diff line number Diff line change
Expand Up @@ -10910,15 +10910,15 @@ TESTCASE (cloaked_items_can_be_queried_added_and_removed)

#if HAVE_ANDROID
COMPILE_AND_LOAD_SCRIPT (
"const x = ptr('0x%" G_GINT64_MODIFIER "x');"
"send(Cloak.hasRangeContaining(x) === false);"
"send(Process.findRangeByAddress(x) !== null);"
"send(Cloak._clipRange(x, 64) === null);"
"Cloak._addRange(x, 64);"
"send(Cloak.hasRangeContaining(x));"
"send(Process.findRangeByAddress(x) === null);"
"send(Cloak._clipRange(x, 64).length === 0);"
"Cloak._removeRange(x, 64);"
"const testRange = { base: ptr('0x%" G_GINT64_MODIFIER "x'), size: 64 };"
"send(Cloak.hasRangeContaining(testRange.base) === false);"
"send(Process.findRangeByAddress(testRange.base) !== null);"
"send(Cloak.clipRange(testRange) === null);"
"Cloak.addRange(testRange);"
"send(Cloak.hasRangeContaining(testRange.base));"
"send(Process.findRangeByAddress(testRange.base) === null);"
"send(Cloak.clipRange(testRange).length === 0);"
"Cloak.removeRange(testRange);"

"send(Cloak.hasCurrentThread() === false);"
"const threadId = Process.getCurrentThreadId();"
Expand All @@ -10938,15 +10938,15 @@ TESTCASE (cloaked_items_can_be_queried_added_and_removed)
);
#else
COMPILE_AND_LOAD_SCRIPT (
"const x = ptr('0x%" G_GINT64_MODIFIER "x');"
"send(Cloak.hasRangeContaining(x) === false);"
"send(Process.findRangeByAddress(x) !== null);"
"send(Cloak._clipRange(x, 64) === null);"
"Cloak._addRange(x, 64);"
"send(Cloak.hasRangeContaining(x));"
"send(Process.findRangeByAddress(x) === null);"
"send(Cloak._clipRange(x, 64).length === 0);"
"Cloak._removeRange(x, 64);"
"const testRange = { base: ptr('0x%" G_GINT64_MODIFIER "x'), size: 64 };"
"send(Cloak.hasRangeContaining(testRange.base) === false);"
"send(Process.findRangeByAddress(testRange.base) !== null);"
"send(Cloak.clipRange(testRange) === null);"
"Cloak.addRange(testRange);"
"send(Cloak.hasRangeContaining(testRange.base));"
"send(Process.findRangeByAddress(testRange.base) === null);"
"send(Cloak.clipRange(testRange).length === 0);"
"Cloak.removeRange(testRange);"

"send(Cloak.hasCurrentThread() === false);"
"const threadId = Process.getCurrentThreadId();"
Expand Down

0 comments on commit ab4453d

Please sign in to comment.