mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Additional testcase related to bug 220158.
This commit is contained in:
parent
5171001393
commit
3d58d666af
1 changed files with 15 additions and 0 deletions
|
@ -11,6 +11,8 @@
|
|||
|
||||
package org.eclipse.cdt.core.internal.tests;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
import junit.framework.Test;
|
||||
import junit.framework.TestCase;
|
||||
import junit.framework.TestSuite;
|
||||
|
@ -38,4 +40,17 @@ public class StringBuilderTest extends TestCase {
|
|||
b1.append(b2);
|
||||
assertEquals("ab", b1.toString());
|
||||
}
|
||||
|
||||
public void testStringBuilderMethods() throws Exception {
|
||||
Class clazz= StringBuilder.class;
|
||||
Method method= clazz.getMethod("append", CharSequence.class);
|
||||
assertNotNull(method);
|
||||
try {
|
||||
method= clazz.getMethod("append", StringBuilder.class);
|
||||
fail();
|
||||
}
|
||||
catch (NoSuchMethodException m) {
|
||||
// ok
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue