View | Details | Raw Unified | Return to bug 214948 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/jdt/core/tests/builder/AnnotationDependencyTests.java (-1 / +26 lines)
Lines 12-18 Link Here
12
12
13
import junit.framework.Test;
13
import junit.framework.Test;
14
14
15
import org.eclipse.core.resources.IMarker;
15
import org.eclipse.core.runtime.IPath;
16
import org.eclipse.core.runtime.IPath;
17
import org.eclipse.jdt.core.compiler.CategorizedProblem;
16
import org.eclipse.jdt.core.tests.util.Util;
18
import org.eclipse.jdt.core.tests.util.Util;
17
19
18
/**
20
/**
Lines 239-243 Link Here
239
		// verify that B was not recompiled
241
		// verify that B was not recompiled
240
		expectingUniqueCompiledClasses(new String[] { "p1.A" });
242
		expectingUniqueCompiledClasses(new String[] { "p1.A" });
241
	}
243
	}
242
	
244
245
	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=214948
246
	public void testPackageInfoDependency() throws Exception {
247
		String notypes = "@question.SimpleAnnotation(\"foo\") package notypes;";
248
		String question = "package question;";
249
		String deprecatedQuestion = "@Deprecated package question;";
250
		String SimpleAnnotation = "package question; " + "\n"
251
			+ "public @interface SimpleAnnotation { String value(); }";
252
253
		IPath notypesPath = env.addClass( this.srcRoot, "notypes", "package-info", notypes );
254
		env.addClass( this.srcRoot, "question", "package-info", question );
255
		env.addClass( this.srcRoot, "question", "SimpleAnnotation", SimpleAnnotation );
256
257
		fullBuild( this.projectPath );
258
		expectingNoProblems();
259
260
		env.addClass( this.srcRoot, "question", "package-info", deprecatedQuestion );
261
		incrementalBuild( this.projectPath );
262
		expectingOnlySpecificProblemFor(notypesPath, new Problem("", "The type SimpleAnnotation is deprecated", notypesPath, 1, 26, CategorizedProblem.CAT_DEPRECATION, IMarker.SEVERITY_WARNING)); //$NON-NLS-1$
263
264
		env.addClass( this.srcRoot, "question", "package-info", question );
265
		incrementalBuild( this.projectPath );
266
		expectingNoProblems();
267
	}	
243
}
268
}

Return to bug 214948