CE
This commit is contained in:
parent
5bde565833
commit
800156a17f
@ -9,6 +9,7 @@
|
||||
<org.solovyev.android.view.widgets.ColorButton xmlns:a="http://schemas.android.com/apk/res/android"
|
||||
xmlns:calc="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
|
||||
a:id="@+id/clearButton"
|
||||
a:drawableTop="@drawable/ic_delete"
|
||||
a:text="@string/c_clear"
|
||||
a:textStyle="bold"
|
||||
style="@style/control_image_button_style"
|
||||
a:onClick="clearButtonClickHandler"/>
|
@ -29,7 +29,7 @@
|
||||
|
||||
<string name="c_undo">undo</string>
|
||||
<string name="c_redo">redo</string>
|
||||
<string name="c_clear">clear all</string>
|
||||
<string name="c_clear">CE</string>
|
||||
<string name="c_erase">clear</string>
|
||||
<string name="c_paste">paste</string>
|
||||
<string name="c_vars">vars</string>
|
||||
|
@ -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
|
||||
|
@ -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"));
|
||||
|
Loading…
Reference in New Issue
Block a user