File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -425,14 +425,6 @@ func (tc TestCase) TestWithConverter(parser typed.ParseableType, converter merge
425
425
}
426
426
if tc .RequiresUnions {
427
427
state .Updater .EnableUnionFeature ()
428
- } else {
429
- // Also test it with unions on.
430
- tc2 := tc
431
- tc2 .RequiresUnions = true
432
- err := tc2 .TestWithConverter (parser , converter )
433
- if err != nil {
434
- return fmt .Errorf ("fails if unions are on: %v" , err )
435
- }
436
428
}
437
429
// We currently don't have any test that converts, we can take
438
430
// care of that later.
@@ -467,5 +459,15 @@ func (tc TestCase) TestWithConverter(parser typed.ParseableType, converter merge
467
459
}
468
460
}
469
461
462
+ if ! tc .RequiresUnions {
463
+ // Re-run the test with unions on.
464
+ tc2 := tc
465
+ tc2 .RequiresUnions = true
466
+ err := tc2 .TestWithConverter (parser , converter )
467
+ if err != nil {
468
+ return fmt .Errorf ("fails if unions are on: %v" , err )
469
+ }
470
+ }
471
+
470
472
return nil
471
473
}
You can’t perform that action at this time.
0 commit comments