Releases: dicksonlaw583/gmassert2
Releases · dicksonlaw583/gmassert2
v2.3.0 - Feather Type-Hinting Support Release
This is a maintenance release adding Feather type-hinting support by moving extension functions out into script assets.
Changes
- All functions have been moved out into script assets grouped by operation type. It is now possible to load only the assertions that you use. (Note:
GMAssert_Internal
must always be imported for the library to work) - All functions now fully support Feather mouse-over descriptions and type-hinting.
- The function listings in the Wiki have been separated by operation type, just like the functions themselves.
- The optional message parameter now uses the optional argument syntax instead of detecting from
argument_count
. As a result, the minimum GameMaker Studio version has been increased to 2.3.7.
Bug Fixes
- Fix missing
assert_is
entry in the Wiki. - Fix outdated content in the Wiki page for creating custom assertions.
- Add instructions to the Wiki for comparing multiple values at once using array and struct literals.
v2.2.1 - 2022.6 Maintenance Release
This is a minor maintenance release for 2022.6's addition of Feather and the ref
type.
Changes
- Added debug value handler for the
ref
type and provisions for future new types.
Bug Fixes
- Fix declared return types and argument counts for the following functions:
__gma_debug_value__
assert_doesnt_contain_exact_2d
- Fix some Feather complaints on the test suite
v2.2.0 - GML 2020 Update
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
andGMASSERT_TOLERANCE
are now configured in a script resource named__GMA_SETTINGS__
.- Debug values now use standard GML notation for most basic types (Examples:
"Hello world!"
365
-infinity
[1, 2, 3]
{x: 5, y: 6, z: 7}
). See the Wiki or helpfile for details. - Because GMS 2.3 removes the built-in distinction between 1D and 2D arrays (i.e. 2D arrays are now just nested 1D arrays), the following assertions no longer support 2D arrays:
assert_contains(got, content, [msg])
assert_contains_exact(got, content[msg])
assert_doesnt_contain(got, content, [msg])
assert_doesnt_contain_exact(got, content, [msg])
- New
_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
- Support for struct (constructor-based and literal-based) and method types
assert_is_struct(got, [msg])
/assert_isnt_struct(got, [msg])
assert_is_method(got, [msg])
/assert_isnt_method(got, [msg])
assert_has_method(got, key, [msg])
/assert_doesnt_have_method(got, key, [msg])
- Support for arbitrary type checking (built-in types and constructor-named types)
assert_is_instance_of(got, typeName, [msg])
/assert_isnt_instance_of(got, typeName, [msg])
- Support for catching exceptions thrown by functions
- Throw-free (or not):
assert_throwless(func, [msg])
/assert_not_throwless(payload, [msg])
- Throw specific type (or not):
assert_throws_instance_of(payload, typeName, [msg])
/assert_doesnt_throw_instance_of(payload, typeName, [msg])
- Throw specific value (or not):
assert_throws(payload, thrown, [msg])
/assert_doesnt_throw(payload, thrown, [msg])
- Throw-free (or not):
- Support debug values for newer types such as fixed-point integers, pointers and strict booleans (Example:
int64(642)
ptr($3f2a)
bool(true)
) - Support for checking keys in a map (also works for structs)
assert_has_key(got, key, [msg])
/assert_doesnt_have_key(got, key, [msg])
- Aliases for checking undefined:
assert_is_undefined(got, [msg])
/assert_isnt_undefined(got, [msg])
v2.1.0 (Open Beta)
This is a major release for GML 2020 updates in GMS 2.3 Open Beta. DO NOT use on production projects yet!
Additions
- Support for struct (constructor-based and literal-based) and method types
assert_is_struct(got, [msg])
/assert_isnt_struct(got, [msg])
assert_is_method(got, [msg])
/assert_isnt_method(got, [msg])
assert_has_method(got, key, [msg])
/assert_doesnt_have_method(got, key, [msg])
- Support for arbitrary type checking (built-in types and constructor-named types)
assert_is_instance_of(got, typeName, [msg])
/assert_isnt_instance_of(got, typeName, [msg])
- Support for catching exceptions thrown by functions
- Throw-free (or not):
assert_throwless(func, [msg])
/assert_not_throwless(payload, [msg])
- Throw specific type (or not):
assert_throws_instance_of(payload, typeName, [msg])
/assert_doesnt_throw_instance_of(payload, typeName, [msg])
- Throw specific value (or not):
assert_throws(payload, thrown, [msg])
/assert_doesnt_throw(payload, thrown, [msg])
- Throw-free (or not):
- Support debug values for newer types such as fixed-point integers, pointers and strict booleans (Example:
int64(642)
ptr($3f2a)
bool(true)
) - Support for checking keys in a map (also works for structs)
assert_has_key(got, key, [msg])
/assert_doesnt_have_key(got, key, [msg])
- Aliases for checking undefined:
assert_is_undefined(got, [msg])
/assert_isnt_undefined(got, [msg])
Changes
- Debug values now use standard GML notation for most basic types (Examples:
"Hello world!"
365
-infinity
[1, 2, 3]
{x: 5, y: 6, z: 7}
). See the Wiki or helpfile for details. - Because GMS 2.3 removes the built-in distinction between 1D and 2D arrays (i.e. 2D arrays are now just nested 1D arrays), the following assertions no longer support 2D arrays:
assert_contains(got, content, [msg])
assert_contains_exact(got, content[msg])
assert_doesnt_contain(got, content, [msg])
assert_doesnt_contain_exact(got, content, [msg])
- New
_2d
-suffixed assertionss 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])
v2.0.0
First extension-based release. Available on the YoYo Marketplace.