From a89e744ed0e8c759caf041a580112365bbfe4303 Mon Sep 17 00:00:00 2001 From: radiohotline Date: Tue, 25 Aug 2026 16:33:56 +0300 Subject: escoria update --- addons/gdUnit4/src/GdUnitFuncAssert.gd | 42 ++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 addons/gdUnit4/src/GdUnitFuncAssert.gd (limited to 'addons/gdUnit4/src/GdUnitFuncAssert.gd') diff --git a/addons/gdUnit4/src/GdUnitFuncAssert.gd b/addons/gdUnit4/src/GdUnitFuncAssert.gd new file mode 100644 index 0000000..e8a49c5 --- /dev/null +++ b/addons/gdUnit4/src/GdUnitFuncAssert.gd @@ -0,0 +1,42 @@ +## An Assertion Tool to verify function callback values +@abstract class_name GdUnitFuncAssert +extends GdUnitAssert + + +## Verifies that the current value is null. +@abstract func is_null() -> GdUnitFuncAssert + + +## Verifies that the current value is not null. +@abstract func is_not_null() -> GdUnitFuncAssert + + +## Verifies that the current value is equal to the given one. +@abstract func is_equal(expected: Variant) -> GdUnitFuncAssert + + +## Verifies that the current value is not equal to expected one. +@abstract func is_not_equal(expected: Variant) -> GdUnitFuncAssert + + +## Overrides the default failure message by given custom message. +@abstract func override_failure_message(message: String) -> GdUnitFuncAssert + + +## Appends a custom message to the failure message. +@abstract func append_failure_message(message: String) -> GdUnitFuncAssert + + +## Verifies that the current value is true. +@abstract func is_true() -> GdUnitFuncAssert + + +## Verifies that the current value is false. +@abstract func is_false() -> GdUnitFuncAssert + + +## Sets the timeout in ms to wait the function returnd the expected value, if the time over a failure is emitted.[br] +## e.g.[br] +## do wait until 5s the function `is_state` is returns 10 [br] +## [code]assert_func(instance, "is_state").wait_until(5000).is_equal(10)[/code] +@abstract func wait_until(timeout: int) -> GdUnitFuncAssert -- cgit v1.3