From 34899b4d051661ce38e380616d096ce7f2fbf094 Mon Sep 17 00:00:00 2001 From: gedi Date: Fri, 4 Mar 2016 11:38:19 +0200 Subject: [PATCH] TestCase should not be public for junit formatter --- fmt_junit.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fmt_junit.go b/fmt_junit.go index 3e76b21..464b30d 100644 --- a/fmt_junit.go +++ b/fmt_junit.go @@ -34,7 +34,7 @@ type junitFormatter struct { func (j *junitFormatter) Feature(feature *gherkin.Feature, path string) { testSuite := &junitTestSuite{ - TestCases: make([]*TestCase, 0), + TestCases: make([]*junitTestCase, 0), Name: feature.Name, } @@ -47,7 +47,7 @@ func (j *junitFormatter) Feature(feature *gherkin.Feature, path string) { func (j *junitFormatter) Node(node interface{}) { suite := j.current() - tcase := &TestCase{} + tcase := &junitTestCase{} switch t := node.(type) { case *gherkin.ScenarioOutline: @@ -145,7 +145,7 @@ type junitError struct { Type string `xml:"type,attr"` } -type TestCase struct { +type junitTestCase struct { XMLName xml.Name `xml:"testcase"` Name string `xml:"name,attr"` Status string `xml:"status,attr"` @@ -162,10 +162,10 @@ type junitTestSuite struct { Failures int `xml:"failures,attr"` Errors int `xml:"errors,attr"` Time string `xml:"time,attr"` - TestCases []*TestCase + TestCases []*junitTestCase } -func (ts *junitTestSuite) current() *TestCase { +func (ts *junitTestSuite) current() *junitTestCase { return ts.TestCases[len(ts.TestCases)-1] }