Test

This is the Test class version 1.0.

Provides a basic test suite.

Initializer

$test = Test()

Creates a new Test class instance.

Arguments

  • optional name: Any - Test name.

  • optional fatal: Any - If true, a failed test will throw a fatal error. This is the default behavior.

Methods

trueValue

$test.trueValue($a)

Test succeeds if Bool($a) === true.

Arguments

  • a: Any - Test object.

veryTrue

$test.veryTrue($a)

Test succeeds if $a === true.

Arguments

  • a: Any - Test object.

equal

$test.equal($a, $b)

Test succeeds if $a == $b.

Arguments

  • a: Any - Test object 1.

  • b: Any - Test object 2.

objectsEqual

$test.objectsEqual($a, $b)

Test succeeds if $a === $b.

Arguments

  • a: Any - Test object 1.

  • b: Any - Test object 2.

notEqual

$test.notEqual($a, $b)

Test succeeds if $a != $b.

Arguments

  • a: Any - Test object 1.

  • b: Any - Test object 2.

objectsNotEqual

$test.objectsNotEqual($a, $b)

Test succeeds if $a !== $b.

Arguments

  • a: Any - Test object 1.

  • b: Any - Test object 2.

instanceOfClass

$test.instanceOfClass($a, $b)

Test succeeds of $a is an instance of class $b.

Arguments

  • a: Any - Test object.

  • b: Any - Test class.

fitsType

$test.fitsType($a, $b)

Test succeeds of $a satisfies type $b.

Arguments

  • a: Any - Test object.

  • b: Any - Test type.

review

$test.review()

Prints the test review.

Arguments

  • optional quiet: Bool

End of the Test class.

This file was generated automatically by the Ferret compiler from Test.frt.