@@ -51,8 +51,10 @@ othercrs:
5151 err := yaml .Unmarshal (test .yaml , & ftl )
5252 if err != nil {
5353 t .Errorf ("test: %d, yaml.UnMarshal failed with '%s'\n " , k , err )
54- } else if ftl .DefaultCRS .Code != test .expectedcrs .Code || ftl .DefaultCRS .Namespace != test .expectedcrs .Namespace {
55- t .Errorf ("test: %d, expected: %v+,\n got: %v+" , k , test .expectedcrs , ftl .DefaultCRS )
54+ } else {
55+ if ftl .DefaultCRS .Code != test .expectedcrs .Code || ftl .DefaultCRS .Namespace != test .expectedcrs .Namespace {
56+ t .Errorf ("test: %d, expected: %v+,\n got: %v+" , k , test .expectedcrs , ftl .DefaultCRS )
57+ }
5658 }
5759 }
5860}
@@ -68,11 +70,13 @@ func TestMarshalYAMLCrs(t *testing.T) {
6870 }
6971 for k , test := range tests {
7072 yamlCRS , err := yaml .Marshal (test .CRS )
71-
7273 if err != nil {
7374 t .Errorf ("test: %d, yaml.Marshal failed with '%s'\n " , k , err )
74- } else if stringCRS := string (yamlCRS ); stringCRS != test .expectedYAML {
75- t .Errorf ("test: %d, expected: %v+,\n got: %v+" , k , test .expectedYAML , stringCRS )
75+ } else {
76+ stringCRS := string (yamlCRS )
77+ if stringCRS != test .expectedYAML {
78+ t .Errorf ("test: %d, expected: %v+,\n got: %v+" , k , test .expectedYAML , stringCRS )
79+ }
7680 }
7781 }
7882}
0 commit comments