/******************************************************************************* * Copyright (c) 2000, 2005 QNX Software Systems 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 * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * QNX Software Systems - Initial API and implementation *******************************************************************************/ package org.eclipse.cdt.debug.core.tests; import java.io.FileNotFoundException; import java.io.IOException; import junit.framework.TestCase; import junit.framework.TestSuite; import org.eclipse.cdt.debug.testplugin.*; import org.eclipse.cdt.core.model.*; import org.eclipse.core.resources.*; import org.eclipse.core.runtime.*; import org.eclipse.cdt.debug.mi.core.*; import org.eclipse.cdt.debug.core.cdi.*; /** * @author Peter Graves * * This file contains a set of generic tests for the CDI Target interfaces. * It will currenly use the mi implementation. * */ public class TargetTests extends TestCase { IWorkspace workspace; IWorkspaceRoot root; ICProject testProject; NullProgressMonitor monitor; /** * Constructor for TargetTests * @param name */ public TargetTests(String name) { super(name); /*** * The assume that they have a working workspace * and workspace root object to use to create projects/files in, * so we need to get them setup first. */ workspace= ResourcesPlugin.getWorkspace(); root= workspace.getRoot(); monitor = new NullProgressMonitor(); if (workspace==null) fail("Workspace was not setup"); if (root==null) fail("Workspace root was not setup"); } /** * Sets up the test fixture. * * Called before every test case method. * * Example code test the packages in the project * "com.qnx.tools.ide.cdt.core" */ protected void setUp() throws CoreException,FileNotFoundException { /*** * Setup the various files, paths and projects that are needed by the * tests */ testProject=CProjectHelper.createCProject("filetest"); if (testProject==null) fail("Unable to create project"); } /** * Tears down the test fixture. * * Called after every test case method. */ protected void tearDown() throws CoreException { CProjectHelper.delete(testProject); } public static TestSuite suite() { return new TestSuite(TargetTests.class); } public static void main (String[] args){ junit.textui.TestRunner.run(suite()); } /*** * A couple tests to make sure various evaluations work as expected */ public void testEvaluate() throws CoreException, MIException, IOException, CDIException, InterruptedException { /*** * Tests to come */ } }