blob: 7cc3aae6c13babdf47ddee6eca86368292881876 [file] [log] [blame]
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)
}
}