package fxtesting | |
import ( | |
"testing" | |
) | |
// T wraps a testing.T to add Fuchsia-specific test functionality. | |
// Example Usage: | |
// t.Run("a_test", func(t *testing.T) { | |
// fxt := T{t} | |
// fxt.AssertNil(MaybeError()) | |
// }) | |
type T struct { | |
*testing.T | |
} | |
// AssertNil raises a fatal error if the error is not nil. | |
func (t *T) AssertNil(err error) { | |
if err != nil { | |
t.Fatal(err) | |
} | |
} |