GameMaker Studio 2 (2.3)
Icon

GMAssert

FrostyCat

You must be logged in to obtain assets

Description

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).

Age Rating: 4+

Versions

GMS2 - Version 2.0.1. Published May 11, 2019

Resolving Marketplace download error.

GMS2.3 - Version 2.2.2. Published September 21, 2020

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__.
  • 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 for details.
  • Because GMS 2.3 removes the built-in distinction between 1D and 2D 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

Please see the Wiki for a comprehensive list of new functions.

  • Support for struct (constructor-based and literal-based) and method types
  • Support for arbitrary type checking (built-in types and constructor-named types)
  • Support for catching exceptions thrown by functions
  • Support debug values for newer types such as fixed-point integers, pointers and strict booleans
  • Support for checking keys in a map (also works for structs)
  • Aliases for checking undefined

Versioning

This version is equivalent to v2.2.0 on GitHub.

Loading, please wait

Package contents

Loading, please wait

What is the issue?

Loading, please wait

Back to Top