Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Gvozdev2011-09-14 17:25:49 +0000
committerAndrew Gvozdev2011-09-14 17:26:39 +0000
commit5ce8c116028fee3fe159fb1cf52a91f3ef5dc2cc (patch)
tree571006d80b60cfa7e7a3e67e43047485b1e91d4e
parentea1b3639c4d3cd5c14ffd4e16014deca27facbbd (diff)
downloadorg.eclipse.cdt-5ce8c116028fee3fe159fb1cf52a91f3ef5dc2cc.tar.gz
org.eclipse.cdt-5ce8c116028fee3fe159fb1cf52a91f3ef5dc2cc.tar.xz
org.eclipse.cdt-5ce8c116028fee3fe159fb1cf52a91f3ef5dc2cc.zip
bug 357660: JUnit failure: cdt.core testSharedDefaults
-rw-r--r--core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/util/BaseTestCase.java4
-rw-r--r--core/org.eclipse.cdt.core.tests/templateengine/org/eclipse/cdt/core/tests/templateengine/TestTemplateEngine.java18
2 files changed, 8 insertions, 14 deletions
diff --git a/core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/util/BaseTestCase.java b/core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/util/BaseTestCase.java
index 86f8412761..d807643ba5 100644
--- a/core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/util/BaseTestCase.java
+++ b/core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/util/BaseTestCase.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2010 Wind River Systems, Inc. and others.
+ * Copyright (c) 2006, 2011 Wind River Systems, Inc. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -159,7 +159,7 @@ public class BaseTestCase extends TestCase {
if (statusLog.size() != fExpectedLoggedNonOK) {
StringBuffer msg= new StringBuffer("Expected number (" + fExpectedLoggedNonOK + ") of ");
- msg.append("non-OK status objects differs from actual (" + statusLog.size() + ").\n");
+ msg.append("non-OK status objects in log differs from actual (" + statusLog.size() + ").\n");
Throwable cause= null;
if (!statusLog.isEmpty()) {
for (IStatus status : statusLog) {
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 2753c8e53c..9c313c6656 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
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007 Symbian Software Limited and others.
+ * Copyright (c) 2007, 2011 Symbian Software Limited and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -12,7 +12,6 @@ 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,20 +49,15 @@ public class TestTemplateEngine extends BaseTestCase {
* check for non null SharedDefaults
*
*/
- 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());
+ public void testSharedDefaults() {
+ assertNotNull(TemplateEngine.getSharedDefaults());
}
/**
- * check that the instace is created once(Singleton).
+ * check that the instance is created once(Singleton).
*/
- public void testSingleton(){
- assertSame(templateEngine, TemplateEngine.getDefault());
+ public void testSingleton() {
+ assertSame(templateEngine, TemplateEngine.getDefault());
}
}

Back to the top