add 'asserts' library

This commit is contained in:
MihailRis 2025-09-14 14:37:11 +03:00
parent 40eda93398
commit 99940da426
2 changed files with 11 additions and 0 deletions

View File

@ -0,0 +1,10 @@
local this = {}
function this.equals(expected, fact)
assert(fact == expected, string.format(
"(fact == expected) assertion failed\n Expected: %s\n Fact: %s",
expected, fact
))
end
return this

View File

@ -174,6 +174,7 @@ if enable_experimental then
require "core:internal/maths_inline"
end
asserts = require "core:internal/asserts"
events = require "core:internal/events"
function pack.unload(prefix)