HaystackTest
@Js
abstract class HaystackTest : Test
HaystackTest provides convenience methods for testing common Haystack data structures.
Convenience for Marker.val
Verify two Dicts have same name/val pairs
Verify that two grids are equal (meta, cols, and rows)
Verify two Refs are equal for both id and dis
Verify contents of two lists using verifyValEq
Verify that given grid is empty (has no rows)
Extend verifyDictEq to fully test the implementation of given dict
Verify two Haystack values are equal
Convenience for constructing a Number where unit may be either a Str name or a Unit instance
const static Marker : m
Convenience for Marker.val
static Number? n(Num? val, Obj? unit)
Convenience for constructing a Number where unit may be either a Str name or a Unit instance.
Void verifyDictEq(Dict a, Obj b, Str? msg)
Verify two Dicts have same name/val pairs
Void verifyDictImpl(Dict d, Str:Obj expect)
Extend verifyDictEq to fully test the implementation of given dict
Void verifyGridEq(Grid a, Grid b)
Verify that two grids are equal (meta, cols, and rows)
Void verifyGridIsEmpty(Grid g)
Verify that given grid is empty (has no rows)
virtual Void verifyListEq(List a, List b, Str? msg)
Verify contents of two lists using verifyValEq
Void verifyRefEq(Ref a, Ref b, Str? msg)
Verify two Refs are equal for both id and dis
Void verifyValEq(Obj? a, Obj? b, Str? msg)
Verify two Haystack values are equal. This method provides additional checking for types which don't support equal including:
- Ref.dis
- Dict
- Grid