Documentation
¶
Overview ¶
Package testassert provides small assertion predicates shared by tests.
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Contains ¶
Contains reports whether container contains elem for strings, maps, arrays, or slices.
if !testassert.Contains(content, "workflow_call:") { t.Fatal("missing workflow call") }
Example ¶
_ = Contains("agent", "agent")
core.Println("Contains")
Output: Contains
func ElementsMatch ¶
ElementsMatch reports whether want and got contain the same elements, ignoring order.
if !testassert.ElementsMatch([]string{"linux", "darwin"}, targets) { t.Fatal("target mismatch") }
Example ¶
_ = ElementsMatch("agent", "agent")
core.Println("ElementsMatch")
Output: ElementsMatch
func Empty ¶
Empty reports whether value is nil, the zero value, or a zero-length container.
if testassert.Empty(artifacts) { t.Fatal("expected artifacts") }
Example ¶
_ = Empty("agent")
core.Println("Empty")
Output: Empty
func Equal ¶
Equal reports whether want and got are deeply equal.
if !testassert.Equal("go", builder.Name()) { t.Fatal("unexpected builder name") }
Example ¶
--- v0.9.0 generated usage examples ---
_ = Equal("agent", "agent")
core.Println("Equal")
Output: Equal
Types ¶
This section is empty.