Assert Class
Additional assertions for unit tests.
Item Index
Methods
- areWithinEpsilon static
- complexWithinEpsilon static
- preserveScrollPosition static
Methods
areWithinEpsilon
(
static
-
expected
-
actual
-
epsilon
Asserts that the mantissas of two values are with epsilon of each other. (The test automatically fails if the exponents are different.)
complexWithinEpsilon
(
static
-
expected
-
actual
-
epsilon
Asserts that both real and imaginary parts of two complex values are with epsilon of each other. (The test automatically fails if the exponents are different.)
Parameters:
-
expected
ComplexNumberthe expected value
-
actual
ComplexNumberthe actual value to test
-
epsilon
ComplexNumberthe maximum allowed difference in the mantissas
preserveScrollPosition
(
static
-
table
-
type
Saves the current vertical scroll position and listens for the appropriate event to trigger restoring the position.
Parameters:
-
table
WidgetDataTable or BulkEditor
-
type
String"table" or "bulkeditor"