()
| 11 | ) |
| 12 | |
| 13 | func ExampleTest() { |
| 14 | ctx, cancel := context.WithTimeout(context.Background(), time.Millisecond*100) |
| 15 | defer cancel() |
| 16 | |
| 17 | err := livetest.Test(ctx, []livetest.TestFunc{ |
| 18 | func(t *livetest.T) { |
| 19 | t.Logf("Executed test no %d", 1) |
| 20 | }, |
| 21 | func(t *livetest.T) { |
| 22 | t.Log("Executed test no 2") |
| 23 | }, |
| 24 | func(t *livetest.T) { |
| 25 | t.Fatal("Fail test no 3") |
| 26 | }, |
| 27 | func(t *livetest.T) { |
| 28 | t.Fatalf("Fail test no %d", 4) |
| 29 | }, |
| 30 | func(t *livetest.T) { |
| 31 | t.Skip("Skipping test no 5") |
| 32 | }, |
| 33 | func(t *livetest.T) { |
| 34 | t.Skipf("Skipping test no %d", 5) |
| 35 | }, |
| 36 | func(t *livetest.T) { |
| 37 | t.SkipNow() |
| 38 | }, |
| 39 | func(t *livetest.T) { |
| 40 | t.Fail() |
| 41 | }, |
| 42 | func(t *livetest.T) { |
| 43 | t.FailNow() |
| 44 | }, |
| 45 | func(t *livetest.T) { |
| 46 | t.Error("Some") |
| 47 | }, |
| 48 | func(t *livetest.T) { |
| 49 | t.Errorf("formatted") |
| 50 | }, |
| 51 | }) |
| 52 | if err != context.DeadlineExceeded { |
| 53 | log.Fatal(err) |
| 54 | } |
| 55 | // Output: |
| 56 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…