From b6742a7c159fa0b38d3ea12769d6ef49129a4640 Mon Sep 17 00:00:00 2001 From: serso Date: Sun, 23 Oct 2011 16:51:58 +0400 Subject: [PATCH] fixes: grouping separator preference --- res/layout/calc_zero_digit_button.xml | 3 ++- res/values/arrays.xml | 2 +- .../java/org/solovyev/android/calculator/math/MathType.java | 2 +- .../android/calculator/model/ToJsclTextProcessorTest.java | 2 ++ 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/res/layout/calc_zero_digit_button.xml b/res/layout/calc_zero_digit_button.xml index 21485d08..ba0dea48 100644 --- a/res/layout/calc_zero_digit_button.xml +++ b/res/layout/calc_zero_digit_button.xml @@ -8,7 +8,8 @@ "" \' - + " " \ No newline at end of file diff --git a/src/main/java/org/solovyev/android/calculator/math/MathType.java b/src/main/java/org/solovyev/android/calculator/math/MathType.java index 43e41157..c6c21af2 100644 --- a/src/main/java/org/solovyev/android/calculator/math/MathType.java +++ b/src/main/java/org/solovyev/android/calculator/math/MathType.java @@ -55,7 +55,7 @@ public enum MathType { } }, - postfix_function(400, true, false, Functions.allPostfix) { + postfix_function(400, true, true, Functions.allPostfix) { @Override protected String getSubstituteToJscl(@NotNull String match) { final String result; diff --git a/src/test/java/org/solovyev/android/calculator/model/ToJsclTextProcessorTest.java b/src/test/java/org/solovyev/android/calculator/model/ToJsclTextProcessorTest.java index 74690c8d..fff21ee4 100644 --- a/src/test/java/org/solovyev/android/calculator/model/ToJsclTextProcessorTest.java +++ b/src/test/java/org/solovyev/android/calculator/model/ToJsclTextProcessorTest.java @@ -118,6 +118,8 @@ public class ToJsclTextProcessorTest { Assert.assertEquals( "20.0*3.141592653589793/180", preprocessor.process("20.0°").toString()); Assert.assertEquals( "sin(30*3.141592653589793/180)", preprocessor.process("sin(30°)").toString()); Assert.assertEquals( "asin(sin(3.141592653589793/6))*3.141592653589793/180", preprocessor.process("asin(sin(π/6))°").toString()); + Assert.assertEquals( "1*3.141592653589793/180*sin(1)", preprocessor.process("1°sin(1)").toString()); + } }