type

HaystackTest

@Js
abstract class HaystackTest : Test

HaystackTest provides convenience methods for testing common Haystack data structures.

fields

m

Convenience for Marker.val

methods

n

Convenience for constructing a Number where unit may be either a Str name or a Unit instance.

verifyDictEq

Verify two Dictts have same name/val pairs

verifyGridEq

Verify that two grids are equal (meta, cols, and rows)

verifyGridIsEmpty

Verify that given grid is empty (has no rows)

verifyListEq

Verify contents of two lists using verifyValEq

verifyRefEq

Verify two Refs are equal for both id and dis

verifyValEq

Verify two Haystack values are equal.

Slot Details

m

const static Marker m := Marker.val

Convenience for Marker.val

n

static Number? n(Num? val, Obj? unit := null)

Convenience for constructing a Number where unit may be either a Str name or a Unit instance.

verifyDictEq

Void verifyDictEq(Dict a, Obj b, Str? msg := null)

Verify two Dictts have same name/val pairs

verifyGridEq

Void verifyGridEq(Grid a, Grid b)

Verify that two grids are equal (meta, cols, and rows)

verifyGridIsEmpty

Void verifyGridIsEmpty(Grid g)

Verify that given grid is empty (has no rows)

verifyListEq

virtual Void verifyListEq(List a, List b, Str? msg := null)

Verify contents of two lists using verifyValEq

verifyRefEq

Void verifyRefEq(Ref a, Ref b, Str? msg := null)

Verify two Refs are equal for both id and dis

verifyValEq

Void verifyValEq(Obj? a, Obj? b, Str? msg := null)

Verify two Haystack values are equal. This method provides additional checking for types which don't support equal including:

  • Ref.dis
  • Dict
  • Grid