This commit is contained in:
serso
2016-02-01 23:15:10 +01:00
parent 8c56dd1083
commit 89680ef544
17 changed files with 158 additions and 164 deletions

View File

@@ -90,7 +90,7 @@ public class AndroidEngineTest extends AbstractCalculatorTest {
}
@Test
public void testI() throws ParseException, EvalException {
public void testI() throws ParseException {
final MathEngine cm = Locator.getInstance().getEngine().getMathEngine();
CalculatorTestUtils.assertEval("-i", cm.evaluate("i^3"));

View File

@@ -22,26 +22,24 @@
package org.solovyev.android.calculator.model;
import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;
import org.solovyev.android.calculator.AbstractCalculatorTest;
import org.solovyev.android.calculator.ParseException;
import org.solovyev.android.calculator.CalculatorTestUtils;
import org.solovyev.android.calculator.Locator;
import org.solovyev.common.Converter;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.Nonnull;
import au.com.bytecode.opencsv.CSVReader;
import jscl.JsclMathEngine;
import jscl.MathEngine;
import jscl.math.Expression;
import jscl.util.ExpressionGeneratorWithInput;
import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;
import org.solovyev.android.calculator.AbstractCalculatorTest;
import org.solovyev.android.calculator.CalculatorTestUtils;
import org.solovyev.android.calculator.Locator;
import org.solovyev.android.calculator.ParseException;
import org.solovyev.common.Converter;
import javax.annotation.Nonnull;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
/**
* User: serso
@@ -56,7 +54,7 @@ public class NumeralBaseTest extends AbstractCalculatorTest {
Locator.getInstance().getEngine().getMathEngine().setPrecision(3);
}
public static void testExpression(@Nonnull String[] line, @Nonnull Converter<String, String> converter) throws jscl.text.ParseException, EvalException, ParseException {
public static void testExpression(@Nonnull String[] line, @Nonnull Converter<String, String> converter) throws jscl.text.ParseException, ParseException {
final String dec = line[0].toUpperCase();
final String hex = "0x:" + line[1].toUpperCase();
final String bin = "0b:" + line[2].toUpperCase();

View File

@@ -149,7 +149,7 @@ public class ToJsclTextProcessorTest extends AbstractCalculatorTest {
Assert.assertEquals("101", JsclMathEngine.getInstance().evaluate("10+11"));
JsclMathEngine.getInstance().setNumeralBase(NumeralBase.hex);
Assert.assertEquals("56CE+CAD", processor.process("56CE+CAD").getExpression());
Assert.assertEquals("56CE+CAD", processor.process("56CE+CAD").getValue());
} finally {
JsclMathEngine.getInstance().setNumeralBase(defaultNumeralBase);
}