Module
Module documentation.
moduletesting
@briefTesting utilities
@detailsMinimal assertion helpers (prints a message and returns an error code on failure).
@see
- index.html
Classes
Classes and inheritance.
Functions
Free functions and class methods.
functiontesting::assert_true
Signature
func assert_true(cond: Bool, msg: String) -> Intfunc assert_true(cond: Bool, msg: String) -> Int {
if cond {
return 0;@briefAssert a condition is true
@param
- condAssertion condition
- msgMessage printed on failure
@return0 on success.
functiontesting::assert_eq_int
Signature
func assert_eq_int(a: Int, b: Int, msg: String) -> Intfunc assert_eq_int(a: Int, b: Int, msg: String) -> Int {
if a == b {
return 0;@briefAssert two Int values are equal
@param
- aExpected/left value
- bActual/right value
- msgMessage printed on failure
@return0 on success.
functiontesting::assert_eq_string
Signature
func assert_eq_string(a: String, b: String, msg: String) -> Intfunc assert_eq_string(a: String, b: String, msg: String) -> Int {
if (a == b) {
return 0;@briefAssert two String values are equal
@param
- aExpected/left value
- bActual/right value
- msgMessage printed on failure
@return0 on success.
Variables
Class fields (var).