From 0dccfde55d3bba5e7c75ff35fc9d6a1c657a3d85 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sun, 31 Dec 2023 11:24:43 +0000 Subject: Use FunctionType builder instead of calling constructor directly --- .../org/shedlang/compiler/config/ConfigCheckerTests.java | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'src/test/java/org/shedlang/compiler/config') 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() ); -- cgit v1.2.3