diff options
Diffstat (limited to 'vendor/github.com/onsi/ginkgo/integration/_fixtures/convert_goldmasters/xunit_test.go')
-rw-r--r-- | vendor/github.com/onsi/ginkgo/integration/_fixtures/convert_goldmasters/xunit_test.go | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/vendor/github.com/onsi/ginkgo/integration/_fixtures/convert_goldmasters/xunit_test.go b/vendor/github.com/onsi/ginkgo/integration/_fixtures/convert_goldmasters/xunit_test.go new file mode 100644 index 000000000..dbe3b419d --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/integration/_fixtures/convert_goldmasters/xunit_test.go @@ -0,0 +1,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() + } +} |