View | Details | Raw Unified | Return to bug 146015
Collapse All | Expand All

(-)src/org/eclipse/jdt/core/tests/eval/VariableTest.java (-4 / +5 lines)
Lines 266-283 Link Here
266
		// Change value of a variable using a code snippet and move it
266
		// Change value of a variable using a code snippet and move it
267
		evaluateWithExpectedValue("var3 = 'z'; return var3;".toCharArray(), "z".toCharArray(), "char".toCharArray());
267
		evaluateWithExpectedValue("var3 = 'z'; return var3;".toCharArray(), "z".toCharArray(), "char".toCharArray());
268
		context.deleteVariable(var3);
268
		context.deleteVariable(var3);
269
		var3 = context.newVariable(var3.getTypeName(), var3.getName(), var3.getInitializer());
270
269
271
		// Change the type of another variable to an incompatible type
270
		// Change the type of another variable to an incompatible type
272
		context.deleteVariable(var4);
271
		context.deleteVariable(var4);
273
		var4 = context.newVariable("java.net.URL".toCharArray(), "var4".toCharArray(), "new java.net.URL(\"http://www.ibm.com/index.html\")".toCharArray());
272
		installVariables(5);
274
273
275
		// Upadte the variables
274
		// Recreate the variables
275
		var3 = context.newVariable(var3.getTypeName(), var3.getName(), var3.getInitializer());
276
		var4 = context.newVariable("java.net.URL".toCharArray(), "var4".toCharArray(), "new java.net.URL(\"http://www.ibm.com/index.html\")".toCharArray());
276
		installVariables(7);
277
		installVariables(7);
277
278
278
		// Get their values
279
		// Get their values
279
		evaluateWithExpectedValue(var1, "1".toCharArray(), "int".toCharArray());
280
		evaluateWithExpectedValue(var1, "1".toCharArray(), "int".toCharArray());
280
		evaluateWithExpectedValue(var3, "z".toCharArray(), "char".toCharArray());
281
		evaluateWithExpectedValue(var3, "c".toCharArray(), "char".toCharArray());
281
		evaluateWithExpectedValue(var4, "http://www.ibm.com/index.html".toCharArray(), "java.net.URL".toCharArray());
282
		evaluateWithExpectedValue(var4, "http://www.ibm.com/index.html".toCharArray(), "java.net.URL".toCharArray());
282
		evaluateWithExpectedValue(var7, "1".toCharArray(), "long".toCharArray());
283
		evaluateWithExpectedValue(var7, "1".toCharArray(), "long".toCharArray());
283
		evaluateWithExpectedValue(var8, "hello".toCharArray(), "java.lang.String".toCharArray());
284
		evaluateWithExpectedValue(var8, "hello".toCharArray(), "java.lang.String".toCharArray());
(-)src/org/eclipse/jdt/core/tests/model/ClasspathInitializerTests.java (-1 / +1 lines)
Lines 131-137 Link Here
131
	super(name);
131
	super(name);
132
}
132
}
133
public static Test suite() {
133
public static Test suite() {
134
	return buildModelTestSuite(ClasspathInitializerTests.class);
134
	return buildModelTestSuite(ClasspathInitializerTests.class, ALPHABETICAL_SORT); // need to sort tests as random order may result with failures
135
}
135
}
136
// Use this static initializer to specify subset for tests
136
// Use this static initializer to specify subset for tests
137
// All specified tests which do not belong to the class are skipped...
137
// All specified tests which do not belong to the class are skipped...
(-)src/org/eclipse/jdt/core/tests/model/SearchParticipantTests.java (-6 / +3 lines)
Lines 31-37 Link Here
31
31
32
	IJavaProject project;
32
	IJavaProject project;
33
	boolean deleteProject = true;
33
	boolean deleteProject = true;
34
	boolean restart = true;
35
34
36
	public class TestSearchParticipant extends SearchParticipant {
35
	public class TestSearchParticipant extends SearchParticipant {
37
		
36
		
Lines 151-160 Link Here
151
150
152
	protected void setUp() throws Exception {
151
	protected void setUp() throws Exception {
153
		super.setUp();
152
		super.setUp();
154
		if (this.restart) {
155
			simulateRestart();
156
			this.restart = false;
157
		}
158
		if (this.project == null) {
153
		if (this.project == null) {
159
			this.project = createJavaProject("P");
154
			this.project = createJavaProject("P");
160
		}
155
		}
Lines 261-271 Link Here
261
		simulateExit();
256
		simulateExit();
262
		assertTrue("Index file should stay after shutdown",  getIndexLocation().toFile().length() > 0);
257
		assertTrue("Index file should stay after shutdown",  getIndexLocation().toFile().length() > 0);
263
		this.deleteProject = false;
258
		this.deleteProject = false;
264
		this.restart = true;
265
259
266
		// remove index file
260
		// remove index file
267
		participant.removeIndex(getIndexLocation());
261
		participant.removeIndex(getIndexLocation());
268
		assertFalse("Index file should have been removed",  getIndexLocation().toFile().exists());
262
		assertFalse("Index file should have been removed",  getIndexLocation().toFile().exists());
263
264
		// restart
265
		simulateRestart();
269
	}
266
	}
270
267
271
	/*
268
	/*

Return to bug 146015