Unit Testing Framework for Gamemaker Studio 2.3+
Supported Version | |
---|---|
Gamemaker Studio 2 | v2.3.0.x |
- Download the exported local package
- Select Tools > Import Local Package
- Navigate to the saved package and select import
- Import all resources
This package is available for download on the Gamemaker Marketplace.
This package is maintained by Paige Marincak. To contribute, please fork the repo and make pull requests.
Samples can be viewed here.
Start running the unit tests
Sets the seed to a static value or a random value. Can be toggled.
@param {Bool} deterministic Whether to set the seed to a static value or not
Expects that the actual value is equal to the expected value
@param {*} expected
@param {*} actual
Expects that the provided value is false
@param {*} value
Expects that the provided value is true
@param {*} value
Expects that the actual value is greater than the expected value
@param {*} expected
@param {*} actual
Expects that the actual value is less than the expected value
@param {*} expected
@param {*} actual
Expects that the actual value is not equal to the expected value
@param {*} expected
@param {*} actual
Expects that the provided value is not null
@param {*} value
Expects that the provided value is null
@param {*} value
Base struct that all harnesses should extend from
///@description Called before the execution of the test.
/// Use this function to setup your fixtures and parameterized tests.
function setup(){
// Override this function
}
///@description Called after the execution of the test.
/// Use this function to clean up your fixtures and parameterized tests.
function tear_down(){
// Override this function
}
Register a basic test with a name and a function to execute
@param {String} name The name of the test to be logged to the console
@param {Function} fn The function to be executed
Disable a registered basic test that has a name and a function to execute
@param {String} name The name of the test to be logged to the console
@param {Function} fn The function to be executed
Register a fixture test with a harness, name and a function to execute
@param {Struct} harness The struct to use as the harness when the test executes
@param {String} name The name of the test to be logged to the console
@param {Function} fn The function to be executed
Disable a registered fixture test that has a harness, name and a function to execute
@param {Struct} harness The struct to use as the harness when the test executes
@param {String} name The name of the test to be logged to the console
@param {Function} fn The function to be executed
Register a parameterized test with a harness, name, array of parameters, and a function to execute
@param {Struct} harness The struct to use as the harness when the test executes
@param {String} name The name of the test to be logged to the console
@param {Array} array An array containing a list of parameters to be executed using the same provided function
@param {Function} fn The function to be executed which takes one parameter
Disable a registered parameterized test that has a harness, name, array of parameters, and a function to execute
@param {Struct} harness The struct to use as the harness when the test executes
@param {String} name The name of the test to be logged to the console
@param {Array} array An array containing a list of parameters to be executed using the same provided function
@param {Function} fn The function to be executed which takes one parameter
The following are a list of resources that can assist you with writing your unit tests.