@@ -737,12 +737,11 @@ func returnResourceCasted(fromType, targetType string, operation ast.Operation)
737
737
738
738
func testResourceCastValid (t * testing.T , types , fromType string , targetType string , operation ast.Operation ) {
739
739
inter := parseCheckAndInterpret (t ,
740
- types +
741
- returnResourceCasted (
742
- fromType ,
743
- targetType ,
744
- operation ,
745
- ),
740
+ types + returnResourceCasted (
741
+ fromType ,
742
+ targetType ,
743
+ operation ,
744
+ ),
746
745
)
747
746
748
747
value , err := inter .Invoke ("test" )
@@ -776,12 +775,10 @@ func testResourceCastValid(t *testing.T, types, fromType string, targetType stri
776
775
777
776
func testResourceCastInvalid (t * testing.T , types , fromType , targetType string , operation ast.Operation ) {
778
777
inter := parseCheckAndInterpret (t ,
779
- fmt .Sprintf (
780
- types + returnResourceCasted (
781
- fromType ,
782
- targetType ,
783
- operation ,
784
- ),
778
+ types + returnResourceCasted (
779
+ fromType ,
780
+ targetType ,
781
+ operation ,
785
782
),
786
783
)
787
784
@@ -886,12 +883,11 @@ func returnStructCasted(fromType, targetType string, operation ast.Operation) st
886
883
887
884
func testStructCastValid (t * testing.T , types , fromType string , targetType string , operation ast.Operation ) {
888
885
inter := parseCheckAndInterpret (t ,
889
- types +
890
- returnStructCasted (
891
- fromType ,
892
- targetType ,
893
- operation ,
894
- ),
886
+ types + returnStructCasted (
887
+ fromType ,
888
+ targetType ,
889
+ operation ,
890
+ ),
895
891
)
896
892
897
893
value , err := inter .Invoke ("test" )
@@ -925,13 +921,10 @@ func testStructCastValid(t *testing.T, types, fromType string, targetType string
925
921
926
922
func testStructCastInvalid (t * testing.T , types , fromType , targetType string , operation ast.Operation ) {
927
923
inter := parseCheckAndInterpret (t ,
928
- fmt .Sprintf (
929
- types +
930
- returnStructCasted (
931
- fromType ,
932
- targetType ,
933
- operation ,
934
- ),
924
+ types + returnStructCasted (
925
+ fromType ,
926
+ targetType ,
927
+ operation ,
935
928
),
936
929
)
937
930
@@ -2256,8 +2249,12 @@ func returnReferenceCasted(fromType, targetType string, operation ast.Operation,
2256
2249
2257
2250
func testReferenceCastValid (t * testing.T , types , fromType , targetType string , operation ast.Operation , isResource bool ) {
2258
2251
inter := parseCheckAndInterpret (t ,
2259
- types +
2260
- returnReferenceCasted (fromType , targetType , operation , isResource ),
2252
+ types + returnReferenceCasted (
2253
+ fromType ,
2254
+ targetType ,
2255
+ operation ,
2256
+ isResource ,
2257
+ ),
2261
2258
)
2262
2259
2263
2260
value , err := inter .Invoke ("test" )
@@ -2309,9 +2306,11 @@ func testReferenceCastValid(t *testing.T, types, fromType, targetType string, op
2309
2306
2310
2307
func testReferenceCastInvalid (t * testing.T , types , fromType , targetType string , operation ast.Operation , isResource bool ) {
2311
2308
inter := parseCheckAndInterpret (t ,
2312
- fmt .Sprintf (
2313
- types +
2314
- returnReferenceCasted (fromType , targetType , operation , isResource ),
2309
+ types + returnReferenceCasted (
2310
+ fromType ,
2311
+ targetType ,
2312
+ operation ,
2313
+ isResource ,
2315
2314
),
2316
2315
)
2317
2316
0 commit comments