test_env.ch

Declarations

Public Only
Publicenum LogType
enum LogType { IOFailure, UnknownFailure, Information, ConfigFailure, Warning, Success, Error, Panic, NetworkFailure, MemoryFailure, RuntimeFailure, OutOfBoundFailure, ResourceFailure, TodoFailure, SecurityFailure, WTFFailure }
Publicinterface TestEnv
interface TestEnv
this interface is exposed to client testing environment tests use this interface to send messages to the parent executable
Publicfunction get_test_id
func get_test_id(self : &TestEnv) : int
* get the current test id * less than zero when not known due to a failure
Publicfunction get_group_name
func get_group_name(self : &TestEnv) : string_view
* get the group name this test belongs to * empty when belongs to no group
Publicfunction logIt
func logIt(self : &TestEnv, type : LogType, msg : *char, lineNum : uint, charNum : uint) : void
* this function logs it
Publicfunction quit_current_group
func quit_current_group(self : &TestEnv, reason : *char) : void
* quits the current group of tests
Publicfunction quit_all_tests
func quit_all_tests(self : &TestEnv, reason : *char) : void
* quit all the tests running
Publicfunction info
func info(env : &TestEnv, msg : *char) : void extension
Publicfunction warning
func warning(env : &TestEnv, msg : *char) : void extension
Publicfunction warn
func warn(env : &TestEnv, msg : *char) : void extension
Publicfunction success
func success(env : &TestEnv, msg : *char) : void extension
Publicfunction error
func error(env : &TestEnv, msg : *char) : void extension
Publicfunction panic
func panic(env : &TestEnv, msg : *char) : void extension