Lines 15-20
Link Here
|
15 |
//import org.apache.tools.ant.types.selectors.SelectorUtils; |
15 |
//import org.apache.tools.ant.types.selectors.SelectorUtils; |
16 |
import org.eclipse.core.runtime.CoreException; |
16 |
import org.eclipse.core.runtime.CoreException; |
17 |
import org.eclipse.jdt.core.compiler.CharOperation; |
17 |
import org.eclipse.jdt.core.compiler.CharOperation; |
|
|
18 |
import org.eclipse.jdt.internal.core.util.Util; |
18 |
|
19 |
|
19 |
//import junit.framework.AssertionFailedError; |
20 |
//import junit.framework.AssertionFailedError; |
20 |
import junit.framework.Test; |
21 |
import junit.framework.Test; |
Lines 738-743
Link Here
|
738 |
// Verify that there were no unexpected results |
739 |
// Verify that there were no unexpected results |
739 |
assertTrue(this.camelCaseErrors.toString(), this.camelCaseErrors.length()==0); |
740 |
assertTrue(this.camelCaseErrors.toString(), this.camelCaseErrors.length()==0); |
740 |
} |
741 |
} |
|
|
742 |
|
743 |
// test org.eclipse.jdt.internal.compiler.util.Util.prefixEquals(char[], char[], boolean, int) |
744 |
public void test010() { |
745 |
char[] name = new char[] { 'a' , 'b', 'c', 'a', 'a' }; |
746 |
char[] prefix = new char[] { 'c', 'a', 'a' }; |
747 |
assertTrue(Util.prefixEquals(prefix, name, false, 2)); |
748 |
prefix = new char[] { 'c', 'a', 'a', 'a' }; |
749 |
assertFalse(Util.prefixEquals(prefix, name, false, 2)); |
750 |
prefix = new char[] { 'c', 'a', 'A' }; |
751 |
assertFalse(Util.prefixEquals(prefix, name, true, 2)); |
752 |
prefix = new char[] { 'b', 'c' }; |
753 |
assertFalse(Util.prefixEquals(prefix, name, false, 2)); |
754 |
assertTrue(Util.prefixEquals(prefix, name, false, 1)); |
755 |
} |
741 |
public static Class testClass() { |
756 |
public static Class testClass() { |
742 |
return UtilTest.class; |
757 |
return UtilTest.class; |
743 |
} |
758 |
} |