@@ -35,7 +35,7 @@ func TestCPUSetSize(t *testing.T) {
3535 for _ , c := range testCases {
3636 actual := c .cpuset .Size ()
3737 if actual != c .expected {
38- t .Fatalf ("expected: %d, actual: %d, cpuset: [%v]" , c .expected , actual , c .cpuset )
38+ t .Errorf ("expected: %d, actual: %d, cpuset: [%v]" , c .expected , actual , c .cpuset )
3939 }
4040 }
4141}
@@ -53,7 +53,7 @@ func TestCPUSetIsEmpty(t *testing.T) {
5353 for _ , c := range testCases {
5454 actual := c .cpuset .IsEmpty ()
5555 if actual != c .expected {
56- t .Fatalf ("expected: %t, IsEmpty() returned: %t, cpuset: [%v]" , c .expected , actual , c .cpuset )
56+ t .Errorf ("expected: %t, IsEmpty() returned: %t, cpuset: [%v]" , c .expected , actual , c .cpuset )
5757 }
5858 }
5959}
@@ -72,12 +72,12 @@ func TestCPUSetContains(t *testing.T) {
7272 for _ , c := range testCases {
7373 for _ , elem := range c .mustContain {
7474 if ! c .cpuset .Contains (elem ) {
75- t .Fatalf ("expected cpuset to contain element %d: [%v]" , elem , c .cpuset )
75+ t .Errorf ("expected cpuset to contain element %d: [%v]" , elem , c .cpuset )
7676 }
7777 }
7878 for _ , elem := range c .mustNotContain {
7979 if c .cpuset .Contains (elem ) {
80- t .Fatalf ("expected cpuset not to contain element %d: [%v]" , elem , c .cpuset )
80+ t .Errorf ("expected cpuset not to contain element %d: [%v]" , elem , c .cpuset )
8181 }
8282 }
8383 }
@@ -108,12 +108,12 @@ func TestCPUSetEqual(t *testing.T) {
108108
109109 for _ , c := range shouldEqual {
110110 if ! c .s1 .Equals (c .s2 ) {
111- t .Fatalf ("expected cpusets to be equal: s1: [%v], s2: [%v]" , c .s1 , c .s2 )
111+ t .Errorf ("expected cpusets to be equal: s1: [%v], s2: [%v]" , c .s1 , c .s2 )
112112 }
113113 }
114114 for _ , c := range shouldNotEqual {
115115 if c .s1 .Equals (c .s2 ) {
116- t .Fatalf ("expected cpusets to not be equal: s1: [%v], s2: [%v]" , c .s1 , c .s2 )
116+ t .Errorf ("expected cpusets to not be equal: s1: [%v], s2: [%v]" , c .s1 , c .s2 )
117117 }
118118 }
119119}
@@ -151,12 +151,12 @@ func TestCPUSetIsSubsetOf(t *testing.T) {
151151
152152 for _ , c := range shouldBeSubset {
153153 if ! c .s1 .IsSubsetOf (c .s2 ) {
154- t .Fatalf ("expected s1 to be a subset of s2: s1: [%v], s2: [%v]" , c .s1 , c .s2 )
154+ t .Errorf ("expected s1 to be a subset of s2: s1: [%v], s2: [%v]" , c .s1 , c .s2 )
155155 }
156156 }
157157 for _ , c := range shouldNotBeSubset {
158158 if c .s1 .IsSubsetOf (c .s2 ) {
159- t .Fatalf ("expected s1 to not be a subset of s2: s1: [%v], s2: [%v]" , c .s1 , c .s2 )
159+ t .Errorf ("expected s1 to not be a subset of s2: s1: [%v], s2: [%v]" , c .s1 , c .s2 )
160160 }
161161 }
162162}
@@ -193,7 +193,7 @@ func TestCPUSetUnion(t *testing.T) {
193193 for _ , c := range testCases {
194194 result := c .s1 .Union (c .others ... )
195195 if ! result .Equals (c .expected ) {
196- t .Fatalf ("expected the union of s1 and s2 to be [%v] (got [%v]), others: [%v]" , c .expected , result , c .others )
196+ t .Errorf ("expected the union of s1 and s2 to be [%v] (got [%v]), others: [%v]" , c .expected , result , c .others )
197197 }
198198 }
199199}
@@ -224,7 +224,7 @@ func TestCPUSetIntersection(t *testing.T) {
224224 for _ , c := range testCases {
225225 result := c .s1 .Intersection (c .s2 )
226226 if ! result .Equals (c .expected ) {
227- t .Fatalf ("expected the intersection of s1 and s2 to be [%v] (got [%v]), s1: [%v], s2: [%v]" , c .expected , result , c .s1 , c .s2 )
227+ t .Errorf ("expected the intersection of s1 and s2 to be [%v] (got [%v]), s1: [%v], s2: [%v]" , c .expected , result , c .s1 , c .s2 )
228228 }
229229 }
230230}
@@ -255,7 +255,7 @@ func TestCPUSetDifference(t *testing.T) {
255255 for _ , c := range testCases {
256256 result := c .s1 .Difference (c .s2 )
257257 if ! result .Equals (c .expected ) {
258- t .Fatalf ("expected the difference of s1 and s2 to be [%v] (got [%v]), s1: [%v], s2: [%v]" , c .expected , result , c .s1 , c .s2 )
258+ t .Errorf ("expected the difference of s1 and s2 to be [%v] (got [%v]), s1: [%v], s2: [%v]" , c .expected , result , c .s1 , c .s2 )
259259 }
260260 }
261261}
@@ -274,15 +274,15 @@ func TestCPUSetList(t *testing.T) {
274274 for _ , c := range testCases {
275275 result := c .set .List ()
276276 if ! reflect .DeepEqual (result , c .expected ) {
277- t .Fatalf ("unexpected List() contents. got [%v] want [%v] (set: [%v])" , result , c .expected , c .set )
277+ t .Errorf ("unexpected List() contents. got [%v] want [%v] (set: [%v])" , result , c .expected , c .set )
278278 }
279279
280280 // We cannot rely on internal storage order details for a unit test.
281281 // The best we can do is to sort the output of 'UnsortedList'.
282282 result = c .set .UnsortedList ()
283283 sort .Ints (result )
284284 if ! reflect .DeepEqual (result , c .expected ) {
285- t .Fatalf ("unexpected UnsortedList() contents. got [%v] want [%v] (set: [%v])" , result , c .expected , c .set )
285+ t .Errorf ("unexpected UnsortedList() contents. got [%v] want [%v] (set: [%v])" , result , c .expected , c .set )
286286 }
287287 }
288288}
@@ -301,7 +301,7 @@ func TestCPUSetString(t *testing.T) {
301301 for _ , c := range testCases {
302302 result := c .set .String ()
303303 if result != c .expected {
304- t .Fatalf ("expected set as string to be %s (got \" %s\" ), s: [%v]" , c .expected , result , c .set )
304+ t .Errorf ("expected set as string to be %s (got \" %s\" ), s: [%v]" , c .expected , result , c .set )
305305 }
306306 }
307307}
@@ -324,10 +324,10 @@ func TestParse(t *testing.T) {
324324 for _ , c := range positiveTestCases {
325325 result , err := Parse (c .cpusetString )
326326 if err != nil {
327- t .Fatalf ("expected error not to have occurred: %v" , err )
327+ t .Errorf ("expected error not to have occurred: %v" , err )
328328 }
329329 if ! result .Equals (c .expected ) {
330- t .Fatalf ("expected string \" %s\" to parse as [%v] (got [%v])" , c .cpusetString , c .expected , result )
330+ t .Errorf ("expected string \" %s\" to parse as [%v] (got [%v])" , c .cpusetString , c .expected , result )
331331 }
332332 }
333333
@@ -343,7 +343,7 @@ func TestParse(t *testing.T) {
343343 for _ , c := range negativeTestCases {
344344 result , err := Parse (c )
345345 if err == nil {
346- t .Fatalf ("expected parse failure of \" %s\" , but it succeeded as \" %s\" " , c , result .String ())
346+ t .Errorf ("expected parse failure of \" %s\" , but it succeeded as \" %s\" " , c , result .String ())
347347 }
348348 }
349349}
0 commit comments