From 30945039100d3322e14e11f75abdf1a05efb0d4d Mon Sep 17 00:00:00 2001 From: Markus Schorn Date: Thu, 13 Dec 2007 11:33:48 +0000 Subject: [PATCH] Fix JUnit-failure when running in head-less mode. --- .../cdt/core/tests/templateengine/TestTemplateEngine.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/org.eclipse.cdt.core.tests/templateengine/org/eclipse/cdt/core/tests/templateengine/TestTemplateEngine.java b/core/org.eclipse.cdt.core.tests/templateengine/org/eclipse/cdt/core/tests/templateengine/TestTemplateEngine.java index 7da4cd30b82..2753c8e53cc 100644 --- a/core/org.eclipse.cdt.core.tests/templateengine/org/eclipse/cdt/core/tests/templateengine/TestTemplateEngine.java +++ b/core/org.eclipse.cdt.core.tests/templateengine/org/eclipse/cdt/core/tests/templateengine/TestTemplateEngine.java @@ -12,6 +12,7 @@ package org.eclipse.cdt.core.tests.templateengine; import org.eclipse.cdt.core.templateengine.TemplateEngine; import org.eclipse.cdt.core.testplugin.util.BaseTestCase; +import org.eclipse.ui.PlatformUI; /** * Test the functionality of TemplateEngine. @@ -50,6 +51,11 @@ public class TestTemplateEngine extends BaseTestCase { * */ public void testSharedDefaults(){ + // when running the testcase in head-less mode, the TestExtraPagesProvider class cannot be loaded, + // which is logged. + if (!PlatformUI.isWorkbenchRunning()) { + setExpectedNumberOfLoggedNonOKStatusObjects(1); + } assertNotNull(TemplateEngine.getSharedDefaults()); }