github.com/fnando/bolt@v0.0.4-0.20231107225351-5241e4d187b8/test/reference/fail/main_test.go (about) 1 //go:build reference 2 // +build reference 3 4 package fail 5 6 import ( 7 "testing" 8 "time" 9 10 "github.com/stretchr/testify/assert" 11 ) 12 13 func failHelper(t *testing.T) { 14 assert.Equal(t, 1, 2) 15 } 16 17 func TestEqualNumberFail(t *testing.T) { 18 time.Sleep(10 * time.Millisecond) 19 assert.Equal(t, 1, 2) 20 } 21 22 func TestFailedThroughHelper(t *testing.T) { 23 time.Sleep(20 * time.Millisecond) 24 failHelper(t) 25 } 26 27 func TestEqualStructFail(t *testing.T) { 28 time.Sleep(30 * time.Millisecond) 29 assert.Equal(t, map[string]any{"a": 1, "b": 2, "c": 3}, map[string]any{"a": 1, "b": 3, "c": 2}) 30 }