From e54f2dc3218f6a5ea256ec0c887613aa44e83a25 Mon Sep 17 00:00:00 2001 From: serso Date: Sat, 12 Nov 2011 16:18:10 +0400 Subject: [PATCH] text highlighter test --- .../org/solovyev/android/calculator/TextHighlighterTest.java | 4 ++++ .../org/solovyev/android/calculator/math/MathTypeTest.java | 2 ++ 2 files changed, 6 insertions(+) diff --git a/src/test/java/org/solovyev/android/calculator/TextHighlighterTest.java b/src/test/java/org/solovyev/android/calculator/TextHighlighterTest.java index 19cd40d0..3ad1639c 100644 --- a/src/test/java/org/solovyev/android/calculator/TextHighlighterTest.java +++ b/src/test/java/org/solovyev/android/calculator/TextHighlighterTest.java @@ -53,5 +53,9 @@ public class TextHighlighterTest { " ln(8)*log(8) => ln(8)*og(8) FIXED\n" + " copy/paste ln(8)*log(8)\n" + " 6!^2 ERROR"); + + Assert.assertEquals("sin(2)", textHighlighter.process("sin(2)").toString()); + Assert.assertEquals("atanh(2)", textHighlighter.process("atanh(2)").toString()); + } } diff --git a/src/test/java/org/solovyev/android/calculator/math/MathTypeTest.java b/src/test/java/org/solovyev/android/calculator/math/MathTypeTest.java index 642a3fc5..38c03982 100644 --- a/src/test/java/org/solovyev/android/calculator/math/MathTypeTest.java +++ b/src/test/java/org/solovyev/android/calculator/math/MathTypeTest.java @@ -41,6 +41,8 @@ public class MathTypeTest { Assert.fail(); } catch (IllegalArgumentException e) { } + + Assert.assertEquals("atanh", MathType.getType("atanh", 0).getMatch()); } /* @Test