@@ -24,46 +24,42 @@ func (s *reporterS) TestWrite(c *C) {
2424 testString := "test string"
2525 output := String {}
2626
27- dummyStream := true
28- dummyVerbose := true
29- o := NewOutputWriter (& output , dummyStream , dummyVerbose )
27+ var dummyVerbosity uint8
28+ o := NewOutputWriter (& output , dummyVerbosity )
3029
3130 o .Write ([]byte (testString ))
3231 c .Assert (output .value , Equals , testString )
3332}
3433
3534func (s * reporterS ) TestWriteCallStartedWithStreamFlag (c * C ) {
3635 testLabel := "test started label"
37- stream := true
36+ var verbosity uint8 = 2
3837 output := String {}
3938
40- dummyVerbose := true
41- o := NewOutputWriter (& output , stream , dummyVerbose )
39+ o := NewOutputWriter (& output , verbosity )
4240
4341 o .WriteCallStarted (testLabel , c )
4442 expected := fmt .Sprintf ("%s: %s:\\ d+: %s\n " , testLabel , s .testFile , c .TestName ())
4543 c .Assert (output .value , Matches , expected )
4644}
4745
4846func (s * reporterS ) TestWriteCallStartedWithoutStreamFlag (c * C ) {
49- stream := false
47+ var verbosity uint8 = 1
5048 output := String {}
5149
5250 dummyLabel := "dummy"
53- dummyVerbose := true
54- o := NewOutputWriter (& output , stream , dummyVerbose )
51+ o := NewOutputWriter (& output , verbosity )
5552
5653 o .WriteCallStarted (dummyLabel , c )
5754 c .Assert (output .value , Equals , "" )
5855}
5956
6057func (s * reporterS ) TestWriteCallProblemWithStreamFlag (c * C ) {
6158 testLabel := "test problem label"
62- stream := true
59+ var verbosity uint8 = 2
6360 output := String {}
6461
65- dummyVerbose := true
66- o := NewOutputWriter (& output , stream , dummyVerbose )
62+ o := NewOutputWriter (& output , verbosity )
6763
6864 o .WriteCallProblem (testLabel , c )
6965 expected := fmt .Sprintf ("%s: %s:\\ d+: %s\n \n " , testLabel , s .testFile , c .TestName ())
@@ -72,11 +68,10 @@ func (s *reporterS) TestWriteCallProblemWithStreamFlag(c *C) {
7268
7369func (s * reporterS ) TestWriteCallProblemWithoutStreamFlag (c * C ) {
7470 testLabel := "test problem label"
75- stream := false
71+ var verbosity uint8 = 1
7672 output := String {}
7773
78- dummyVerbose := true
79- o := NewOutputWriter (& output , stream , dummyVerbose )
74+ o := NewOutputWriter (& output , verbosity )
8075
8176 o .WriteCallProblem (testLabel , c )
8277 expected := fmt .Sprintf ("" +
@@ -89,11 +84,10 @@ func (s *reporterS) TestWriteCallProblemWithoutStreamFlag(c *C) {
8984func (s * reporterS ) TestWriteCallProblemWithoutStreamFlagWithLog (c * C ) {
9085 testLabel := "test problem label"
9186 testLog := "test log"
92- stream := false
87+ var verbosity uint8 = 1
9388 output := String {}
9489
95- dummyVerbose := true
96- o := NewOutputWriter (& output , stream , dummyVerbose )
90+ o := NewOutputWriter (& output , verbosity )
9791
9892 c .Log (testLog )
9993 o .WriteCallProblem (testLabel , c )
@@ -106,11 +100,10 @@ func (s *reporterS) TestWriteCallProblemWithoutStreamFlagWithLog(c *C) {
106100
107101func (s * reporterS ) TestWriteCallSuccessWithStreamFlag (c * C ) {
108102 testLabel := "test success label"
109- stream := true
103+ var verbosity uint8 = 2
110104 output := String {}
111105
112- dummyVerbose := true
113- o := NewOutputWriter (& output , stream , dummyVerbose )
106+ o := NewOutputWriter (& output , verbosity )
114107
115108 o .WriteCallSuccess (testLabel , c )
116109 expected := fmt .Sprintf ("%s: %s:\\ d+: %s\t \\ d\\ .\\ d+s\n \n " , testLabel , s .testFile , c .TestName ())
@@ -120,11 +113,10 @@ func (s *reporterS) TestWriteCallSuccessWithStreamFlag(c *C) {
120113func (s * reporterS ) TestWriteCallSuccessWithStreamFlagAndReason (c * C ) {
121114 testLabel := "test success label"
122115 testReason := "test skip reason"
123- stream := true
116+ var verbosity uint8 = 2
124117 output := String {}
125118
126- dummyVerbose := true
127- o := NewOutputWriter (& output , stream , dummyVerbose )
119+ o := NewOutputWriter (& output , verbosity )
128120 c .FakeSkip (testReason )
129121
130122 o .WriteCallSuccess (testLabel , c )
@@ -135,11 +127,10 @@ func (s *reporterS) TestWriteCallSuccessWithStreamFlagAndReason(c *C) {
135127
136128func (s * reporterS ) TestWriteCallSuccessWithoutStreamFlagWithVerboseFlag (c * C ) {
137129 testLabel := "test success label"
138- stream := false
139- verbose := true
130+ var verbosity uint8 = 1
140131 output := String {}
141132
142- o := NewOutputWriter (& output , stream , verbose )
133+ o := NewOutputWriter (& output , verbosity )
143134
144135 o .WriteCallSuccess (testLabel , c )
145136 expected := fmt .Sprintf ("%s: %s:\\ d+: %s\t \\ d\\ .\\ d+s\n " , testLabel , s .testFile , c .TestName ())
@@ -148,11 +139,10 @@ func (s *reporterS) TestWriteCallSuccessWithoutStreamFlagWithVerboseFlag(c *C) {
148139
149140func (s * reporterS ) TestWriteCallSuccessWithoutStreamFlagWithoutVerboseFlag (c * C ) {
150141 testLabel := "test success label"
151- stream := false
152- verbose := false
142+ var verbosity uint8 = 0
153143 output := String {}
154144
155- o := NewOutputWriter (& output , stream , verbose )
145+ o := NewOutputWriter (& output , verbosity )
156146
157147 o .WriteCallSuccess (testLabel , c )
158148 c .Assert (output .value , Equals , "" )
0 commit comments