EgretDoc
Back to Home
Location:system/testing

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
Signaturefunc assert_true(cond: Bool, msg: String) -> Int
func 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
Signaturefunc assert_eq_int(a: Int, b: Int, msg: String) -> Int
func 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
Signaturefunc assert_eq_string(a: String, b: String, msg: String) -> Int
func 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).