libgo: update to Go 1.11
[official-gcc.git] / libgo / go / cmd / go / testdata / src / failfast_test.go
blob6e64d73fdf9a923d6d43dc91015ba855100a74ef
1 // Copyright 2017 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
5 package failfast
7 import "testing"
9 func TestA(t *testing.T) {
10 // Edge-case testing, mixing unparallel tests too
11 t.Logf("LOG: %s", t.Name())
14 func TestFailingA(t *testing.T) {
15 t.Errorf("FAIL - %s", t.Name())
18 func TestB(t *testing.T) {
19 // Edge-case testing, mixing unparallel tests too
20 t.Logf("LOG: %s", t.Name())
23 func TestParallelFailingA(t *testing.T) {
24 t.Parallel()
25 t.Errorf("FAIL - %s", t.Name())
28 func TestParallelFailingB(t *testing.T) {
29 t.Parallel()
30 t.Errorf("FAIL - %s", t.Name())
33 func TestParallelFailingSubtestsA(t *testing.T) {
34 t.Parallel()
35 t.Run("TestFailingSubtestsA1", func(t *testing.T) {
36 t.Errorf("FAIL - %s", t.Name())
38 t.Run("TestFailingSubtestsA2", func(t *testing.T) {
39 t.Errorf("FAIL - %s", t.Name())
43 func TestFailingSubtestsA(t *testing.T) {
44 t.Run("TestFailingSubtestsA1", func(t *testing.T) {
45 t.Errorf("FAIL - %s", t.Name())
47 t.Run("TestFailingSubtestsA2", func(t *testing.T) {
48 t.Errorf("FAIL - %s", t.Name())
52 func TestFailingB(t *testing.T) {
53 t.Errorf("FAIL - %s", t.Name())
56 func TestFatalC(t *testing.T) {
57 t.Fatalf("FAIL - %s", t.Name())
60 func TestFatalD(t *testing.T) {
61 t.Fatalf("FAIL - %s", t.Name())