Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[334922] CharOperation#match does not work as expected when isCaseSen…

…sitive is passed as false
  • Loading branch information...
commit e9f1643c81bdc2717503e31d19154e77554dd59b 1 parent db94967
nitind authored
View
14 ....jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/CharOperationTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2011 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -103,6 +103,18 @@ public void test007() {
array2 = new char[] { 'a' , 'b', 'd'};
assertTrue(CharOperation.compareTo(array, array2) < 0);
}
+public void test008a() {
+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=334922
+ char[] array = "A*".toCharArray();
+ char[] array2 = "AA".toCharArray();
+ assertTrue("case sensitive prefix match failed", CharOperation.match(array, array2, true));
+}
+public void test008b() {
+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=334922
+ char[] array = "A*".toCharArray();
+ char[] array2 = "aa".toCharArray();
+ assertTrue("case insensitive prefix match failed", CharOperation.match(array, array2, false));
+}
public static Class testClass() {
return CharOperationTest.class;
}
Please sign in to comment.
Something went wrong with that request. Please try again.