1package tmp
2
3import (
4	. "github.com/onsi/ginkgo"
5)
6
7var _ = Describe("Testing with Ginkgo", func() {
8	It("something important", func() {
9
10		whatever := &UselessStruct{
11			T:              GinkgoT(),
12			ImportantField: "SECRET_PASSWORD",
13		}
14		something := &UselessStruct{ImportantField: "string value"}
15		assertEqual(GinkgoT(), whatever.ImportantField, "SECRET_PASSWORD")
16		assertEqual(GinkgoT(), something.ImportantField, "string value")
17
18		var foo = func(t GinkgoTInterface) {}
19		foo(GinkgoT())
20
21		strp := "something"
22		testFunc(GinkgoT(), &strp)
23		GinkgoT().Fail()
24	})
25	It("3 things", func() {
26
27		if 3 != 3 {
28			GinkgoT().Fail()
29		}
30	})
31})
32
33type UselessStruct struct {
34	ImportantField string
35	T              GinkgoTInterface
36}
37
38var testFunc = func(t GinkgoTInterface, arg *string) {}
39
40func assertEqual(t GinkgoTInterface, arg1, arg2 interface{}) {
41	if arg1 != arg2 {
42		t.Fail()
43	}
44}
45