From a9ac4681f068619fcbae433f9b249e9ff7d24783 Mon Sep 17 00:00:00 2001 From: Danila Fedorin Date: Sat, 5 Aug 2017 17:13:03 -0700 Subject: [PATCH] Use a specific configuration instead of chancing it with a local file. --- src/test/java/org/nwapw/abacus/tests/CalculationTests.java | 3 ++- src/test/java/org/nwapw/abacus/tests/TokenizerTests.java | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/test/java/org/nwapw/abacus/tests/CalculationTests.java b/src/test/java/org/nwapw/abacus/tests/CalculationTests.java index 61cbc5b..d2ea541 100644 --- a/src/test/java/org/nwapw/abacus/tests/CalculationTests.java +++ b/src/test/java/org/nwapw/abacus/tests/CalculationTests.java @@ -4,13 +4,14 @@ import org.junit.Assert; import org.junit.BeforeClass; import org.junit.Test; import org.nwapw.abacus.Abacus; +import org.nwapw.abacus.config.Configuration; import org.nwapw.abacus.number.NumberInterface; import org.nwapw.abacus.plugin.StandardPlugin; import org.nwapw.abacus.tree.TreeNode; public class CalculationTests { - private static Abacus abacus = new Abacus(); + private static Abacus abacus = new Abacus(new Configuration("precise", new String[]{})); @BeforeClass public static void prepareTests(){ diff --git a/src/test/java/org/nwapw/abacus/tests/TokenizerTests.java b/src/test/java/org/nwapw/abacus/tests/TokenizerTests.java index 7de1ec0..6ba223c 100644 --- a/src/test/java/org/nwapw/abacus/tests/TokenizerTests.java +++ b/src/test/java/org/nwapw/abacus/tests/TokenizerTests.java @@ -4,6 +4,7 @@ import org.junit.Assert; import org.junit.BeforeClass; import org.junit.Test; import org.nwapw.abacus.Abacus; +import org.nwapw.abacus.config.Configuration; import org.nwapw.abacus.function.Function; import org.nwapw.abacus.function.Operator; import org.nwapw.abacus.function.OperatorAssociativity; @@ -18,7 +19,7 @@ import java.util.List; public class TokenizerTests { - private static Abacus abacus = new Abacus(); + private static Abacus abacus = new Abacus(new Configuration("precise", new String[]{})); private static LexerTokenizer lexerTokenizer = new LexerTokenizer(); private static Function subtractFunction = new Function() { @Override