diff options
| author | Michael Williamson <mike@zwobble.org> | 2023-12-31 11:24:43 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2023-12-31 11:24:43 +0000 |
| commit | 0dccfde55d3bba5e7c75ff35fc9d6a1c657a3d85 (patch) | |
| tree | dfa581fc740326b2e238bc679ce143951f3c98b2 /src/test/java/org/shedlang/compiler/config | |
| parent | 4316c4a80e33ceea40990472f215440a6f678623 (diff) | |
Use FunctionType builder instead of calling constructor directly
Diffstat (limited to 'src/test/java/org/shedlang/compiler/config')
| -rw-r--r-- | src/test/java/org/shedlang/compiler/config/ConfigCheckerTests.java | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/test/java/org/shedlang/compiler/config/ConfigCheckerTests.java b/src/test/java/org/shedlang/compiler/config/ConfigCheckerTests.java index 3c53df73..b3468c6e 100644 --- a/src/test/java/org/shedlang/compiler/config/ConfigCheckerTests.java +++ b/src/test/java/org/shedlang/compiler/config/ConfigCheckerTests.java @@ -6,7 +6,6 @@ import org.shedlang.compiler.typechecker.TypeInfos; import org.shedlang.compiler.types.*; import java.io.IOException; -import java.util.List; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.zwobble.precisely.AssertThat.assertThat; @@ -22,7 +21,10 @@ public class ConfigCheckerTests { NamespaceTypeInfo.builder() .addField( "main", - new FunctionType(List.of(), List.of(), Effects.IO, Types.UNIT) + FunctionType.builder() + .withEffect(Effects.IO) + .withReturnType(Types.UNIT) + .build() ) .build() ); @@ -52,7 +54,10 @@ public class ConfigCheckerTests { NamespaceTypeInfo.builder() .addField( "main2", - new FunctionType(List.of(), List.of(), Effects.IO, Types.UNIT) + FunctionType.builder() + .withEffect(Effects.IO) + .withReturnType(Types.UNIT) + .build() ) .build() ); @@ -74,7 +79,10 @@ public class ConfigCheckerTests { NamespaceTypeInfo.builder() .addField( "main", - new FunctionType(List.of(), List.of(), Effects.IO, Types.STRING) + FunctionType.builder() + .withEffect(Effects.IO) + .withReturnType(Types.STRING) + .build() ) .build() ); |
