From f3a3ea15c1d6f5edbc3b17fad01025465fc76cf2 Mon Sep 17 00:00:00 2001 From: Sergey Solovyev Date: Thu, 13 Oct 2011 13:28:06 +0400 Subject: [PATCH] CE --- res/layout/calc_clear_button.xml | 3 ++- res/values/strings.xml | 2 +- .../org/solovyev/android/calculator/model/CalculatorModel.java | 1 + .../solovyev/android/calculator/model/CalculatorModelTest.java | 1 + 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/res/layout/calc_clear_button.xml b/res/layout/calc_clear_button.xml index da1af738..3fd23042 100644 --- a/res/layout/calc_clear_button.xml +++ b/res/layout/calc_clear_button.xml @@ -9,6 +9,7 @@ \ No newline at end of file diff --git a/res/values/strings.xml b/res/values/strings.xml index 37992ffe..682052b0 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -29,7 +29,7 @@ undo redo - clear all + CE clear paste vars diff --git a/src/main/java/org/solovyev/android/calculator/model/CalculatorModel.java b/src/main/java/org/solovyev/android/calculator/model/CalculatorModel.java index 354cde40..1ca8030d 100644 --- a/src/main/java/org/solovyev/android/calculator/model/CalculatorModel.java +++ b/src/main/java/org/solovyev/android/calculator/model/CalculatorModel.java @@ -14,6 +14,7 @@ import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.solovyev.android.calculator.JsclOperation; import org.solovyev.common.NumberMapper; +import org.solovyev.common.utils.MutableObject; /** * User: serso diff --git a/src/test/java/org/solovyev/android/calculator/model/CalculatorModelTest.java b/src/test/java/org/solovyev/android/calculator/model/CalculatorModelTest.java index 5cd55a20..21dc24c9 100644 --- a/src/test/java/org/solovyev/android/calculator/model/CalculatorModelTest.java +++ b/src/test/java/org/solovyev/android/calculator/model/CalculatorModelTest.java @@ -48,6 +48,7 @@ public class CalculatorModelTest { Assert.assertEquals("-2.0+2.1i", cm.evaluate(JsclOperation.numeric, "-2+2.1i")); Assert.assertEquals("-3.41007+3.41007i", cm.evaluate(JsclOperation.numeric, "(5tan(2i)+2i)/(1-i)")); Assert.assertEquals("-0.1-0.2i", cm.evaluate(JsclOperation.numeric, "(1-i)/(2+6i)")); + //Assert.assertEquals("-0.1-0.2i", cm.evaluate(JsclOperation.numeric, "cos(cos(cos(cos(acos(acos(acos(acos(acos(acos(acos(acos(cos(cos(cos(cos(cosh(acos(cos()))))))))))))))))))")); CalculatorModel.instance.getVarsRegister().addVar(null, new Var.Builder("si", 5d)); Assert.assertEquals("5.0", cm.evaluate(JsclOperation.numeric, "si"));