- Contents
- Initializer
- Methods
Test
This is the Test class version 1.0.
Provides a basic test suite.
Initializer
$test = Test()
Creates a new Test class instance.
-
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
.
- a: Any - Test object.
veryTrue
$test.veryTrue($a)
Test succeeds if $a === true
.
- a: Any - Test object.
equal
$test.equal($a, $b)
Test succeeds if $a == $b
.
-
a: Any - Test object 1.
-
b: Any - Test object 2.
objectsEqual
$test.objectsEqual($a, $b)
Test succeeds if $a === $b
.
-
a: Any - Test object 1.
-
b: Any - Test object 2.
notEqual
$test.notEqual($a, $b)
Test succeeds if $a != $b
.
-
a: Any - Test object 1.
-
b: Any - Test object 2.
objectsNotEqual
$test.objectsNotEqual($a, $b)
Test succeeds if $a !== $b
.
-
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
.
-
a: Any - Test object.
-
b: Any - Test class.
fitsType
$test.fitsType($a, $b)
Test succeeds of $a
satisfies type $b
.
-
a: Any - Test object.
-
b: Any - Test type.
review
$test.review()
Prints the test review.
-
optional quiet: Bool
End of the Test class.
This file was generated automatically by the Ferret compiler from Test.frt.