setting up GDUnit
Some checks failed
Create tag and build when new code gets to main / Export (push) Failing after 3m40s

This commit is contained in:
2026-01-25 18:19:26 +01:00
parent 39d6ab1c5f
commit c28d97de2d
471 changed files with 29716 additions and 16 deletions

View File

@@ -0,0 +1,24 @@
## A fuzzer that generates random boolean values for testing.[br]
##
## This is useful for testing code paths that
## depend on boolean conditions, flags, or toggle states.[br]
##
## [b]Usage example:[/b]
## [codeblock]
## func test_toggle_feature(fuzzer := BoolFuzzer.new(), _fuzzer_iterations = 100):
## var enabled := fuzzer.next_value()
## my_feature.set_enabled(enabled)
## assert_bool(my_feature.is_enabled()),is_equal(enabled)
## [/codeblock]
class_name BoolFuzzer
extends Fuzzer
## Generates a random boolean value.[br]
##
## Returns either [code]true[/code] or [code]false[/code] with equal probability.
## This method is called automatically during fuzz testing iterations.[br]
##
## @returns A randomly generated boolean value ([code]true[/code] or [code]false[/code]).
func next_value() -> bool:
return randi() % 2