summaryrefslogtreecommitdiff
path: root/vendor/github.com/onsi/ginkgo/integration/_fixtures/convert_goldmasters/xunit_test.go
blob: dbe3b419d1857375256c0a284629a7472867ade1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
package tmp

import (
	. "github.com/onsi/ginkgo"
)

var _ = Describe("Testing with Ginkgo", func() {
	It("something important", func() {

		whatever := &UselessStruct{
			T:              GinkgoT(),
			ImportantField: "SECRET_PASSWORD",
		}
		something := &UselessStruct{ImportantField: "string value"}
		assertEqual(GinkgoT(), whatever.ImportantField, "SECRET_PASSWORD")
		assertEqual(GinkgoT(), something.ImportantField, "string value")

		var foo = func(t GinkgoTInterface) {}
		foo(GinkgoT())

		strp := "something"
		testFunc(GinkgoT(), &strp)
		GinkgoT().Fail()
	})
	It("3 things", func() {

		if 3 != 3 {
			GinkgoT().Fail()
		}
	})
})

type UselessStruct struct {
	ImportantField string
	T              GinkgoTInterface
}

var testFunc = func(t GinkgoTInterface, arg *string) {}

func assertEqual(t GinkgoTInterface, arg1, arg2 interface{}) {
	if arg1 != arg2 {
		t.Fail()
	}
}