mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
bug 357660: JUnit failure: cdt.core testSharedDefaults
This commit is contained in:
parent
ea1b3639c4
commit
5ce8c11602
2 changed files with 8 additions and 14 deletions
|
@ -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) {
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue