We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e3fb448 commit cd7f768Copy full SHA for cd7f768
1 file changed
tests/test-memory.lua
@@ -48,17 +48,10 @@ function test_memory.test_allocateCode()
48
end
49
50
function test_memory.test_allocateCode_zero()
51
- local addr = rps.allocateCode(1000, true)-- sample is hopefully high enough to not have all 0's
+ local status, errMsg = pcall(function() rps.allocateCode(1000, true) end)-- sample is hopefully high enough to not have all 0's
52
53
- local nonZero = false
54
- for _, value in ipairs(rps.readBytes(addr, 1000)) do
55
- if value ~= 0 then
56
- nonZero = true
57
- break
58
- end
59
60
-
61
- lunatest.assert_false(nonZero, 'all zero values (unexpected)')
+ lunatest.assert_false(status)
+ lunatest.assert_equal("Wrong number of arguments passed", errMsg)
62
63
64
return test_memory
0 commit comments