Overview
GMAssert is a library containing useful assertions for debugging and automated unit testing. You can use it to alert you to undesirable runtime conditions, pause the debugger at that point for further inspection, or quickly test code for expected behaviour.
Documentation
See the Wiki section on the official GitHub repository.
GMAssert is 100% open source!
Bug reports and contributions welcome on the official GitHub repository.
End User Licence Agreement (EULA).
Resolving Marketplace download error.
This is a major release for GML 2020 updates in GMS 2.3. If you are upgrading from an older release, please read the changes carefully!
Changes
GMASSERT_ENABLED
and GMASSERT_TOLERANCE
are now configured in a script resource named __GMA_SETTINGS__
."Hello world!"
365
-infinity
[1, 2, 3]
{x: 5, y: 6, z: 7}
). See the Wiki for details.assert_contains(got, content, [msg])
assert_contains_exact(got, content[msg])
assert_doesnt_contain(got, content, [msg])
assert_doesnt_contain_exact(got, content, [msg])
_2d
-suffixed assertions have been added to handle containment-type assertions in 2D arrays. These new assertions also support grids.
assert_contains_2d(got, content, [msg])
assert_contains_exact_2d(got, content[msg])
assert_doesnt_contain_2d(got, content, [msg])
assert_doesnt_contain_exact_2d(got, content, [msg])
Additions
Please see the Wiki for a comprehensive list of new functions.
Versioning
This version is equivalent to v2.2.0 on GitHub.