git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Jalview-JS/JAL-3253-applet JAL-3192 secondary core files
[jalview.git]
/
test
/
jalview
/
util
/
matcher
/
MatcherTest.java
diff --git
a/test/jalview/util/matcher/MatcherTest.java
b/test/jalview/util/matcher/MatcherTest.java
index
f4c8181
..
a47fb60
100644
(file)
--- a/
test/jalview/util/matcher/MatcherTest.java
+++ b/
test/jalview/util/matcher/MatcherTest.java
@@
-6,8
+6,12
@@
import static org.testng.Assert.assertNotEquals;
import static org.testng.Assert.assertTrue;
import static org.testng.Assert.fail;
import static org.testng.Assert.assertTrue;
import static org.testng.Assert.fail;
+import java.util.Locale;
+
import org.testng.annotations.Test;
import org.testng.annotations.Test;
+import junit.extensions.PA;
+
public class MatcherTest
{
@Test(groups = "Functional")
public class MatcherTest
{
@Test(groups = "Functional")
@@
-15,7
+19,8
@@
public class MatcherTest
{
MatcherI m = new Matcher(Condition.Contains, "foo");
assertEquals(m.getCondition(), Condition.Contains);
{
MatcherI m = new Matcher(Condition.Contains, "foo");
assertEquals(m.getCondition(), Condition.Contains);
- assertEquals(m.getPattern(), "FOO"); // all comparisons upper-cased
+ assertEquals(m.getPattern(), "foo");
+ assertEquals(PA.getValue(m, "uppercasePattern"), "FOO");
assertEquals(m.getFloatValue(), 0f);
m = new Matcher(Condition.GT, -2.1f);
assertEquals(m.getFloatValue(), 0f);
m = new Matcher(Condition.GT, -2.1f);
@@
-25,7
+30,7
@@
public class MatcherTest
m = new Matcher(Condition.NotContains, "-1.2f");
assertEquals(m.getCondition(), Condition.NotContains);
m = new Matcher(Condition.NotContains, "-1.2f");
assertEquals(m.getCondition(), Condition.NotContains);
- assertEquals(m.getPattern(), "-1.2F");
+ assertEquals(m.getPattern(), "-1.2f");
assertEquals(m.getFloatValue(), 0f);
m = new Matcher(Condition.GE, "-1.2f");
assertEquals(m.getFloatValue(), 0f);
m = new Matcher(Condition.GE, "-1.2f");
@@
-208,11
+213,13
@@
public class MatcherTest
@Test(groups = "Functional")
public void testToString()
{
@Test(groups = "Functional")
public void testToString()
{
+ Locale.setDefault(Locale.ENGLISH);
+
MatcherI m = new Matcher(Condition.LT, 1.2e-6f);
MatcherI m = new Matcher(Condition.LT, 1.2e-6f);
- assertEquals(m.toString(), "LT 1.2E-6");
+ assertEquals(m.toString(), "< 1.2E-6");
m = new Matcher(Condition.NotMatches, "ABC");
m = new Matcher(Condition.NotMatches, "ABC");
- assertEquals(m.toString(), "NotMatches 'ABC'");
+ assertEquals(m.toString(), "Does not match 'ABC'");
m = new Matcher(Condition.Contains, -1.2f);
assertEquals(m.toString(), "Contains '-1.2'");
m = new Matcher(Condition.Contains, -1.2f);
assertEquals(m.toString(), "Contains '-1.2'");