1
/*******************************************************************************
2
* Copyright (c) 2008 Wind River Systems, Inc. and others.
3
* All rights reserved. This program and the accompanying materials
4
* are made available under the terms of the Eclipse Public License v1.0
5
* which accompanies this distribution, and is available at
6
* http://www.eclipse.org/legal/epl-v10.html
9
* Markus Schorn - initial API and implementation
10
*******************************************************************************/
12
package org.eclipse.cdt.core.internal.tests;
14
import java.lang.reflect.Method;
16
import junit.framework.Test;
17
import junit.framework.TestCase;
18
import junit.framework.TestSuite;
20
public class StringBuilderTest extends TestCase {
21
public static Test suite() {
22
return new TestSuite(StringBuilderTest.class);
25
public void testSafe() {
26
StringBuilder b1= new StringBuilder();
27
StringBuilder b2= new StringBuilder();
32
assertEquals("ab", b1.toString());
35
public void testBug220158() {
36
StringBuilder b1= new StringBuilder();
37
StringBuilder b2= new StringBuilder();
41
assertEquals("ab", b1.toString());
44
public void testStringBuilderMethods() throws Exception {
45
Class clazz= StringBuilder.class;
46
Method method= clazz.getMethod("append", CharSequence.class);
47
assertNotNull(method);
49
method= clazz.getMethod("append", StringBuilder.class);
52
catch (NoSuchMethodException m) {