From 714779e9185010cdbad373eb4969c7ff985cd6a2 Mon Sep 17 00:00:00 2001 From: Anton Leherbauer Date: Tue, 17 Apr 2007 14:20:08 +0000 Subject: [PATCH] Avoid debug output in test --- .../text/AbstractSemanticHighlightingTest.java | 14 ++++++++++---- .../ui/tests/text/SemanticHighlightingTest.java | 2 +- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/AbstractSemanticHighlightingTest.java b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/AbstractSemanticHighlightingTest.java index 60802a6d226..e1444962d28 100644 --- a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/AbstractSemanticHighlightingTest.java +++ b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/AbstractSemanticHighlightingTest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2005 IBM Corporation and others. + * Copyright (c) 2000, 2007 IBM Corporation 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 @@ -7,6 +7,7 @@ * * Contributors: * IBM Corporation - initial API and implementation + * Anton Leherbauer (Wind River Systems) *******************************************************************************/ package org.eclipse.cdt.ui.tests.text; @@ -63,6 +64,7 @@ public class AbstractSemanticHighlightingTest extends TestCase { private ICProject fCProject; private final String fTestFilename; + private File fSdkFile; public SemanticHighlightingTestSetup(Test test, String testFilename) { super(test); @@ -76,12 +78,13 @@ public class AbstractSemanticHighlightingTest extends TestCase { "void SDKFunction();\n"+ "class SDKClass { public: SDKMethod(); };\n\n"; - final File sdk= createExternalSDK(sdkCode); - sdk.deleteOnExit(); + fSdkFile= createExternalSDK(sdkCode); + assertNotNull(fSdkFile); + fSdkFile.deleteOnExit(); fCProject= EditorTestHelper.createCProject(PROJECT, LINKED_FOLDER); - importExternalSDK(sdk, fCProject); + importExternalSDK(fSdkFile, fCProject); fEditor= (CEditor) EditorTestHelper.openInEditor(ResourceTestHelper.findFile(fTestFilename), true); fSourceViewer= EditorTestHelper.getSourceViewer(fEditor); @@ -152,6 +155,9 @@ public class AbstractSemanticHighlightingTest extends TestCase { if (fCProject != null) CProjectHelper.delete(fCProject); + if (fSdkFile != null) { + fSdkFile.delete(); + } super.tearDown(); } } diff --git a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/SemanticHighlightingTest.java b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/SemanticHighlightingTest.java index 7522214d6bd..16ae401893f 100644 --- a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/SemanticHighlightingTest.java +++ b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/SemanticHighlightingTest.java @@ -27,7 +27,7 @@ import org.eclipse.cdt.internal.ui.editor.SemanticHighlightings; */ public class SemanticHighlightingTest extends AbstractSemanticHighlightingTest { - private static final boolean PRINT_POSITIONS= true; + private static final boolean PRINT_POSITIONS= false; private static final Class THIS= SemanticHighlightingTest.class;