Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'core/org.eclipse.cdt.ui.tests/model/org/eclipse')
-rw-r--r--core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/AllCoreTests.java42
-rw-r--r--core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/ArchiveTests.java199
-rw-r--r--core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/BinaryTests.java429
-rw-r--r--core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/CModelElementsTests.java113
-rw-r--r--core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/CModelExceptionTest.java113
-rw-r--r--core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/CModelTests.java222
-rw-r--r--core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/ElementDeltaTests.java245
-rw-r--r--core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/FlagTests.java212
-rw-r--r--core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/TranslationUnitTests.java298
-rw-r--r--core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/WorkingCopyTests.java106
-rw-r--r--core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/cfiles/CModelElementsTestStart.h11
-rw-r--r--core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/cfiles/TranslationUnits.c68
-rw-r--r--core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/cfiles/WorkingCopyTestStart.h2
-rw-r--r--core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/Makefile8
-rw-r--r--core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/common.mk7
-rw-r--r--core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/main.c7
-rw-r--r--core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/ppc/Makefile8
-rw-r--r--core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/ppc/be.g/Makefile1
-rw-r--r--core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/ppc/be.g/exe_gbin18341 -> 0 bytes
-rw-r--r--core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/ppc/be.g/main.obin7724 -> 0 bytes
-rw-r--r--core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/ppc/be.g/test.obin8036 -> 0 bytes
-rw-r--r--core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/ppc/be.g/test2.obin8128 -> 0 bytes
-rw-r--r--core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/test.c14
-rw-r--r--core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/test2.c13
-rw-r--r--core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/x86/Makefile8
-rw-r--r--core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/x86/o.g/Makefile1
-rw-r--r--core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/x86/o.g/exe_gbin10783 -> 0 bytes
-rw-r--r--core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/x86/o.g/main.obin5980 -> 0 bytes
-rw-r--r--core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/x86/o.g/test.obin6148 -> 0 bytes
-rw-r--r--core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/x86/o.g/test2.obin6284 -> 0 bytes
-rw-r--r--core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/x86/o/Makefile1
-rw-r--r--core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/x86/o/exebin4591 -> 0 bytes
-rw-r--r--core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/x86/o/main.obin892 -> 0 bytes
-rw-r--r--core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/x86/o/test.obin980 -> 0 bytes
-rw-r--r--core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/x86/o/test2.obin1076 -> 0 bytes
-rw-r--r--core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exebig/Makefile8
-rw-r--r--core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exebig/common.mk7
-rw-r--r--core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exebig/main.c8
-rw-r--r--core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exebig/x86/Makefile8
-rw-r--r--core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exebig/x86/o.g/Makefile1
-rw-r--r--core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exebig/x86/o.g/exebig_gbin9065 -> 0 bytes
-rw-r--r--core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exebig/x86/o.g/main.obin6180 -> 0 bytes
-rw-r--r--core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/testlib/Makefile8
-rw-r--r--core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/testlib/common.mk6
-rw-r--r--core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/testlib/test.c14
-rw-r--r--core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/testlib/test2.c13
-rw-r--r--core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/testlib/x86/Makefile8
-rw-r--r--core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/testlib/x86/a.g/Makefile1
-rw-r--r--core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/testlib/x86/a.g/libtestlib_g.abin12682 -> 0 bytes
-rw-r--r--core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/testlib/x86/a.g/test.obin6156 -> 0 bytes
-rw-r--r--core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/testlib/x86/a.g/test2.obin6284 -> 0 bytes
-rw-r--r--core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/testlib/x86/so.g/Makefile1
-rw-r--r--core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/testlib/x86/so.g/libtestlib_g.sobin10171 -> 0 bytes
-rw-r--r--core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/testlib/x86/so.g/libtestlib_gS.abin12906 -> 0 bytes
-rw-r--r--core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/testlib/x86/so.g/test.obin6272 -> 0 bytes
-rw-r--r--core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/testlib/x86/so.g/test2.obin6392 -> 0 bytes
56 files changed, 0 insertions, 2211 deletions
diff --git a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/AllCoreTests.java b/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/AllCoreTests.java
deleted file mode 100644
index eddf8c0493d..00000000000
--- a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/AllCoreTests.java
+++ /dev/null
@@ -1,42 +0,0 @@
-package org.eclipse.cdt.core.model.tests;
-/*
- * (c) Copyright QNX Software Systems Ltd. 2002.
- * All Rights Reserved.
- */
-
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-
-/**
- *
- * AllTests.java
- * This is the main entry point for running this suite of JUnit tests
- * for all tests within the package "org.eclipse.cdt.core.model"
- *
- * @author Judy N. Green
- * @since Jul 19, 2002
- */
-public class AllCoreTests {
-
- public static void main(String[] args) {
- junit.textui.TestRunner.run(suite());
- }
-
- public static Test suite() {
- TestSuite suite = new TestSuite();
-
- // Just add more test cases here as you create them for
- // each class being tested
-
- suite.addTest(CModelTests.suite());
- suite.addTest(CModelExceptionTest.suite());
- suite.addTest(FlagTests.suite());
- suite.addTest(ArchiveTests.suite());
- suite.addTest(TranslationUnitTests.suite());
- return suite;
-
- }
-} // End of AllCoreTests.java
-
diff --git a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/ArchiveTests.java b/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/ArchiveTests.java
deleted file mode 100644
index 53520adb0ae..00000000000
--- a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/ArchiveTests.java
+++ /dev/null
@@ -1,199 +0,0 @@
-package org.eclipse.cdt.core.model.tests;
-
-/*
- * (c) Copyright QNX Software Systems Ltd. 2002.
- * All Rights Reserved.
- */
-
-
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-import org.eclipse.cdt.testplugin.*;
-import org.eclipse.cdt.testplugin.util.*;
-import org.eclipse.cdt.core.model.*;
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-
-
-
-/**
- * @author Peter Graves
- *
- * This file contains a set of generic tests for the core C model's Archive
- * class. There is nothing exotic here, mostly just sanity type tests
- *
- */
-public class ArchiveTests extends TestCase {
- IWorkspace workspace;
- IWorkspaceRoot root;
- ICProject testProject;
- IFile cfile, exefile, libfile, archfile, objfile;
- Path cpath, exepath, libpath, archpath, objpath;
- NullProgressMonitor monitor;
-
-
- /**
- * Constructor for ArchiveTests
- * @param name
- */
- public ArchiveTests(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
- */
- String pluginRoot=org.eclipse.core.runtime.Platform.getPlugin("org.eclipse.cdt.ui.tests").find(new Path("/")).getFile();
- testProject=CProjectHelper.createCProject("filetest", "none");
- if (testProject==null)
- fail("Unable to create project");
-
- cfile = testProject.getProject().getFile("exetest.c");
- if (!cfile.exists()) {
- cfile.create(new FileInputStream(pluginRoot+"model/org/eclipse/cdt/core/model/tests/resources/exe/main.c"),false, monitor);
-
- }
- cpath=new Path(workspace.getRoot().getLocation()+"/filetest/main.c");
-
- objfile = testProject.getProject().getFile("exetest.o");
- if (!objfile.exists()) {
- objfile.create(new FileInputStream(pluginRoot+"model/org/eclipse/cdt/core/model/tests/resources/exe/x86/o.g/main.o"),false, monitor);
-
- }
- objpath=new Path(workspace.getRoot().getLocation()+"/filetest/main.o");
-
- exefile = testProject.getProject().getFile("test_g");
- if (!exefile.exists()) {
- exefile.create(new FileInputStream(pluginRoot+"model/org/eclipse/cdt/core/model/tests/resources/exe/x86/o.g/exe_g"),false, monitor);
-
- }
- exepath=new Path(workspace.getRoot().getLocation()+"/filetest/exe_g");
-
- archfile = testProject.getProject().getFile("libtestlib_g.a");
- if (!archfile.exists()) {
- archfile.create(new FileInputStream(pluginRoot+"model/org/eclipse/cdt/core/model/tests/resources/testlib/x86/a.g/libtestlib_g.a"),false, monitor);
-
- }
- libpath=new Path(workspace.getRoot().getLocation()+"/filetest/libtestlib_g.so");
-
- libfile = testProject.getProject().getFile("libtestlib_g.so");
- if (!libfile.exists()) {
- libfile.create(new FileInputStream(pluginRoot+"model/org/eclipse/cdt/core/model/tests/resources/testlib/x86/so.g/libtestlib_g.so"),false, monitor);
-
- }
- archpath=new Path(workspace.getRoot().getLocation()+"/filetest/libtestlib_g.a");
-
-
- }
-
- /**
- * 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(ArchiveTests.class);
- }
-
- public static void main (String[] args){
- junit.textui.TestRunner.run(suite());
- }
-
-
-
- public void testGetBinaries() throws CoreException,FileNotFoundException {
- IArchive myArchive;
- IBinary[] bins;
- ICElement[] elements;
- ExpectedStrings expBin, expObj[];
- String[] myStrings;
- int x;
-
-
- /****
- * Setup the expected strings for the binaries, and the elements within
- * the binaries
- */
- myStrings=new String[2];
- myStrings[0]="test.o";
- myStrings[1]="test2.o";
- expBin=new ExpectedStrings(myStrings);
-
- expObj=new ExpectedStrings[2];
- myStrings[0]="func1";
- myStrings[1]="func2";
- expObj[0]=new ExpectedStrings(myStrings);
- myStrings[0]="test2func1";
- myStrings[1]="test2func2";
- expObj[1]=new ExpectedStrings(myStrings);
-
- /***
- * Grab the archive we want to test, and find all the binaries and
- * all the elements in all the binaries and make sure we get
- * everything we expect.
- */
- myArchive=CProjectHelper.findArchive(testProject, "libtestlib_g.a");
- if (myArchive==null)
- fail("Could not find archive");
- bins=myArchive.getBinaries();
- for (x=0;x<bins.length;x++) {
- expBin.foundString(bins[x].getElementName());
- elements=bins[x].getChildren();
- for (int i=0;i<elements.length;i++) {
- expObj[x].foundString(elements[i].getElementName());
- }
- }
-
- assertTrue(expBin.getMissingString(), expBin.gotAll());
- assertTrue(expBin.getExtraString(), !expBin.gotExtra());
- for (x=0;x<expObj.length;x++) {
- assertTrue("Binary " + expBin.expStrings[x] + " " +expObj[x].getMissingString(), expObj[x].gotAll());
- assertTrue("Binary " + expBin.expStrings[x] + " " + expObj[x].getExtraString(), !expObj[x].gotExtra());
- }
- }
- /***
- * Simple sanity test to make sure Archive.isArchive returns true
- *
- */
- public void testIsArchive() throws CoreException,FileNotFoundException {
- IArchive myArchive;
- myArchive=CProjectHelper.findArchive(testProject, "libtestlib_g.a");
-
- assertTrue("A archive", myArchive != null);
- myArchive=null;
-
-
- }
-
-}
diff --git a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/BinaryTests.java b/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/BinaryTests.java
deleted file mode 100644
index b5f9af70b83..00000000000
--- a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/BinaryTests.java
+++ /dev/null
@@ -1,429 +0,0 @@
-package org.eclipse.cdt.core.model.tests;
-
-/*
- * (c) Copyright QNX Software Systems Ltd. 2002.
- * All Rights Reserved.
- */
-
-
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-import org.eclipse.cdt.testplugin.*;
-import org.eclipse.cdt.testplugin.util.*;
-import org.eclipse.cdt.core.model.*;
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-
-
-
-/**
- * @author Peter Graves
- *
- * This file contains a set of generic tests for the core C model's Binary
- * class. There is nothing exotic here, mostly just sanity type tests
- *
- */
-public class BinaryTests extends TestCase {
- IWorkspace workspace;
- IWorkspaceRoot root;
- ICProject testProject;
- IFile cfile, exefile, libfile, archfile, objfile, bigexe, ppcexefile, ndexe;
- Path cpath, exepath, libpath, archpath, objpath;
- NullProgressMonitor monitor;
-
-
-
- /**
- * Constructor for BinaryTests
- * @param name
- */
- public BinaryTests(String name) {
- super(name);
-
- }
-
- /**
- * @see java.lang.Object#finalize()
- */
- protected void finalize() throws Throwable {
- super.finalize();
-
- /**
- * Make sure we leave the workspace clean for the next set of tests
- */
- CProjectHelper.delete(testProject);
-
-
- }
-
-
- /**
- * 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 {
- String pluginRoot;
- /***
- * The tests 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");
-
-
- /***
- * Setup the various files, paths and projects that are needed by the
- * tests
- */
-
- testProject=CProjectHelper.createCProject("filetest", "none");
- if (testProject==null)
- fail("Unable to create project");
-
- pluginRoot=org.eclipse.core.runtime.Platform.getPlugin("org.eclipse.cdt.ui.tests").find(new Path("/")).getFile();
-
- cfile = testProject.getProject().getFile("exetest.c");
- if (!cfile.exists()) {
- cfile.create(new FileInputStream(pluginRoot+"model/org/eclipse/cdt/core/model/tests/resources/exe/main.c"),false, monitor);
-
- }
- cpath=new Path(workspace.getRoot().getLocation()+"/filetest/main.c");
-
- objfile = testProject.getProject().getFile("exetest.o");
- if (!objfile.exists()) {
- objfile.create(new FileInputStream(pluginRoot+"model/org/eclipse/cdt/core/model/tests/resources/exe/x86/o.g/main.o"),false, monitor);
-
- }
- objpath=new Path(workspace.getRoot().getLocation()+"/filetest/exetest.o");
-
- exefile = testProject.getProject().getFile("test_g");
- if (!exefile.exists()) {
- exefile.create(new FileInputStream(pluginRoot+"model/org/eclipse/cdt/core/model/tests/resources/exe/x86/o.g/exe_g"),false, monitor);
-
- }
- exepath=new Path(workspace.getRoot().getLocation()+"/filetest/exe_g");
- ppcexefile = testProject.getProject().getFile("ppctest_g");
- if (!ppcexefile.exists()) {
- ppcexefile.create(new FileInputStream(pluginRoot+"model/org/eclipse/cdt/core/model/tests/resources/exe/ppc/be.g/exe_g"),false, monitor);
-
- }
- ndexe = testProject.getProject().getFile("exetest");
- if (!ndexe.exists()) {
- ndexe.create(new FileInputStream(pluginRoot+"model/org/eclipse/cdt/core/model/tests/resources/exe/x86/o/exe"),false, monitor);
-
- }
-
-
-
- bigexe = testProject.getProject().getFile("exebig_g");
- if (!bigexe.exists()) {
- bigexe.create(new FileInputStream(pluginRoot+"model/org/eclipse/cdt/core/model/tests/resources/exebig/x86/o.g/exebig_g"),false, monitor);
-
- }
-
- archfile = testProject.getProject().getFile("libtestlib_g.a");
- if (!archfile.exists()) {
- archfile.create(new FileInputStream(pluginRoot+"model/org/eclipse/cdt/core/model/tests/resources/testlib/x86/a.g/libtestlib_g.a"),false, monitor);
-
- }
- libpath=new Path(workspace.getRoot().getLocation()+"/filetest/libtestlib_g.so");
-
- libfile = testProject.getProject().getFile("libtestlib_g.so");
- if (!libfile.exists()) {
- libfile.create(new FileInputStream(pluginRoot+"model/org/eclipse/cdt/core/model/tests/resources/testlib/x86/so.g/libtestlib_g.so"),false, monitor);
-
- }
- archpath=new Path(workspace.getRoot().getLocation()+"/filetest/libtestlib_g.a");
-
-
-
-
- }
-
- /**
- * Tears down the test fixture.
- *
- * Called after every test case method.
- */
- protected void tearDown() throws CoreException {
- // release resources here and clean-up
- testProject.getProject().close(null);
- testProject.getProject().open(null);
-
- CProjectHelper.delete(testProject);
-
- }
-
- public static TestSuite suite() {
- return new TestSuite(BinaryTests.class);
- }
-
- public static void main (String[] args){
- junit.textui.TestRunner.run(suite());
- }
-
-
-
- /****
- * Simple tests to make sure we can get all of a binarys children
- */
- public void testGetChildren() throws CoreException,FileNotFoundException {
- IBinary myBinary;
- ICElement[] elements;
- ExpectedStrings expSyms;
- String[] myStrings = {"atexit", "exit", "_init_libc", "printf", "_fini",
- "test.c", "_init","main.c", "_start", "test2.c", "_btext", "errno"};
-
- expSyms=new ExpectedStrings(myStrings);
-
- /***
- * Grab the IBinary we want to test, and find all the elements in all
- * the binarie and make sure we get everything we expect.
- */
- myBinary=CProjectHelper.findBinary(testProject, "test_g");
- elements=myBinary.getChildren();
- for (int i=0;i<elements.length;i++) {
- expSyms.foundString(elements[i].getElementName());
- }
-
- assertTrue(expSyms.getMissingString(), expSyms.gotAll());
- assertTrue(expSyms.getExtraString(), !expSyms.gotExtra());
- }
-
- /***
- * A quick check to make sure the getBSS function works as expected.
- */
- public void testGetBss(){
- IBinary bigBinary,littleBinary;
- bigBinary=CProjectHelper.findBinary(testProject, "exebig_g");
- littleBinary=CProjectHelper.findBinary(testProject, "test_g");
-
- assertTrue("Expected 432, Got: " + bigBinary.getBSS(), bigBinary.getBSS()==432);
- assertTrue("Expected 4, Got: " + littleBinary.getBSS(), littleBinary.getBSS()==4);
- }
- /***
- * A quick check to make sure the getBSS function works as expected.
- */
- public void testGetData(){
- IBinary bigBinary,littleBinary;
- bigBinary=CProjectHelper.findBinary(testProject, "exebig_g");
- littleBinary=CProjectHelper.findBinary(testProject, "test_g");
- if (false) {
- /****
- * Since there is no comment on this function, I have no idea what
- * it is ment to do. Once I find out what it's ment to do, I will
- * actually write some tests.
- * PR23602
- */
- assertTrue("Expected 76 Got: " + bigBinary.getData(), bigBinary.getData()==76);
- assertTrue("Expected 8, Got: " + littleBinary.getData(), littleBinary.getData()==8);
- } else
- fail("PR:23602 No docs, can't test");
- }
-
- /***
- * A very small set of tests to make usre Binary.getCPU() seems to return
- * something sane for the most common exe type (x86) and one other (ppc)
- * This is not a in depth test at all.
- */
- public void testGetCpu() {
- IBinary myBinary;
- myBinary=CProjectHelper.findBinary(testProject, "exebig_g");
-
- assertTrue("Expected: x86 Got: " + myBinary.getCPU(),myBinary.getCPU().equals("x86"));
- myBinary=CProjectHelper.findBinary(testProject, ppcexefile.toString());
- assertTrue("Expected: ppcbe Got: " + myBinary.getCPU(),myBinary.getCPU().equals("ppcbe"));
-
- }
-
- /****
- * A set of simple tests to make sute getNeededSharedLibs seems to be sane
- */
- public void testGetNeededSharedLibs() {
- IBinary myBinary;
- String[] exelibs={"libsocket.so.2", "libc.so.2"};
- String[] bigexelibs={"libc.so.2"};
- String[] gotlibs;
- ExpectedStrings exp;
- int x;
-
- exp=new ExpectedStrings(exelibs);
- myBinary=CProjectHelper.findBinary(testProject, "test_g");
- gotlibs=myBinary.getNeededSharedLibs();
- for (x=0;x<gotlibs.length;x++) {
- exp.foundString(gotlibs[x]);
- }
- assertTrue(exp.getMissingString(), exp.gotAll());
- assertTrue(exp.getExtraString(), !exp.gotExtra());
-
- exp=new ExpectedStrings(bigexelibs);
- myBinary=CProjectHelper.findBinary(testProject,"exebig_g");
- gotlibs=myBinary.getNeededSharedLibs();
- for (x=0;x<gotlibs.length;x++) {
- exp.foundString(gotlibs[x]);
- }
- assertTrue(exp.getMissingString(), exp.gotAll());
- assertTrue(exp.getExtraString(), !exp.gotExtra());
-
- exp=new ExpectedStrings(bigexelibs);
- myBinary=CProjectHelper.findBinary(testProject, "libtestlib_g.so");
- gotlibs=myBinary.getNeededSharedLibs();
- for (x=0;x<gotlibs.length;x++) {
- exp.foundString(gotlibs[x]);
- }
- assertTrue(exp.getMissingString(), exp.gotAll());
- assertTrue(exp.getExtraString(), !exp.gotExtra());
-
- }
-
- /****
- * Simple tests for the getSoname method;
- */
- public void testGetSoname() {
- IBinary myBinary;
- String name;
- myBinary=CProjectHelper.findBinary(testProject, "test_g");
- assertTrue(myBinary.getSoname().equals(""));
-
- myBinary=CProjectHelper.findBinary(testProject, "libtestlib_g.so");
- name=myBinary.getSoname();
- assertNotNull(name);
- assertTrue("Expected: libtestlib_g.so.1 Got: " + name,
- name.equals("libtestlib_g.so.1"));
-
- }
-
- /***
- * Simple tests for getText
- */
- public void testGetText() {
- IBinary bigBinary,littleBinary;
- bigBinary=CProjectHelper.findBinary(testProject, bigexe.toString());
- littleBinary=CProjectHelper.findBinary(testProject, exefile.toString());
- if (false) {
- /****
- * Since there is no comment on this function, I have no idea what
- * it is ment to do. Once I find out what it's ment to do, I will
- * actually write some tests.
- * PR23602
- */
-
- assertTrue("Expected 296, Got: " + bigBinary.getText(), bigBinary.getText()==296);
- assertTrue("Expected 296, Got: " + littleBinary.getText(), littleBinary.getText()==296);
- } else
- fail("PR:23602 No docs, can't test");
- }
-
- /***
- * Simple tests for the hadDebug call
- */
- public void testHasDebug() {
- IBinary myBinary;
- myBinary = CProjectHelper.findBinary(testProject, "test_g");
- assertTrue(myBinary.hasDebug());
- myBinary = CProjectHelper.findBinary(testProject, "libtestlib_g.so");
- assertTrue(myBinary.hasDebug());
- myBinary = CProjectHelper.findBinary(testProject, "exetest");
- assertTrue(!myBinary.hasDebug());
- }
-
- /***
- * Sanity - isBinary and isReadonly should always return true;
- */
- public void testisBinRead() {
- IBinary myBinary;
- myBinary =CProjectHelper.findBinary(testProject, "test_g");
- assertTrue(myBinary != null);
- assertTrue(myBinary.isReadOnly());
-
- }
-
- /***
- * Quick tests to make sure isObject works as expected.
- */
- public void testIsObject() {
- IBinary myBinary;
- myBinary=CProjectHelper.findObject(testProject, "exetest.o");
- assertTrue(myBinary.isObject());
-
-
- myBinary= CProjectHelper.findBinary(testProject, "test_g");
- assertTrue(!myBinary.isObject());
-
- myBinary= CProjectHelper.findBinary(testProject, "libtestlib_g.so");
- assertTrue(!myBinary.isObject());
-
- myBinary= CProjectHelper.findBinary(testProject, "exetest");
- assertTrue(!myBinary.isObject());
-
- }
-
- /***
- * Quick tests to make sure isSharedLib works as expected.
- */
- public void testIsSharedLib() {
- IBinary myBinary;
-
- myBinary=CProjectHelper.findObject(testProject, "exetest.o");
- assertTrue(!myBinary.isSharedLib());
-
- myBinary= CProjectHelper.findBinary(testProject, "libtestlib_g.so");
- assertTrue(myBinary.isSharedLib());
-
- myBinary= CProjectHelper.findBinary(testProject, "test_g");
- assertTrue(!myBinary.isSharedLib());
-
-
- myBinary= CProjectHelper.findBinary(testProject, "exetest");
- assertTrue(!myBinary.isSharedLib());
-
- }
-
- /***
- * Quick tests to make sure isExecutable works as expected.
- */
- public void testIsExecutable() throws InterruptedException {
- IBinary myBinary;
- myBinary=CProjectHelper.findObject(testProject, "exetest.o");
- assertTrue(!myBinary.isExecutable());
-
- myBinary=CProjectHelper.findBinary(testProject, "test_g");
- assertTrue(myBinary.isExecutable());
-
- myBinary= CProjectHelper.findBinary(testProject, "libtestlib_g.so");
- assertTrue(!myBinary.isExecutable());
-
-
- myBinary= CProjectHelper.findBinary(testProject, "exetest");
- assertTrue(myBinary.isExecutable());
-
- }
-
- /***
- * Simple sanity test to make sure Binary.isBinary returns true
- *
- */
- public void testIsBinary() throws CoreException,FileNotFoundException,Exception {
- IBinary myBinary;
-
- myBinary=CProjectHelper.findBinary(testProject, "exebig_g");
- assertTrue("A Binary", myBinary != null);
- }
-
-
-
-
-}
diff --git a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/CModelElementsTests.java b/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/CModelElementsTests.java
deleted file mode 100644
index f00c22e37e2..00000000000
--- a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/CModelElementsTests.java
+++ /dev/null
@@ -1,113 +0,0 @@
-package org.eclipse.cdt.core.model.tests;
-
-/**********************************************************************
- * Copyright (c) 2002,2003 Rational Software Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * Rational Software - Initial API and implementation
-***********************************************************************/
-import java.io.FileInputStream;
-import java.util.ArrayList;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-import org.eclipse.cdt.core.CCorePlugin;
-import org.eclipse.cdt.core.model.ICElement;
-import org.eclipse.cdt.core.model.ICProject;
-import org.eclipse.cdt.core.model.IField;
-import org.eclipse.cdt.core.model.IMember;
-import org.eclipse.cdt.core.model.IMethod;
-import org.eclipse.cdt.core.model.INamespace;
-import org.eclipse.cdt.core.model.IStructure;
-import org.eclipse.cdt.internal.core.model.TranslationUnit;
-import org.eclipse.cdt.testplugin.CProjectHelper;
-import org.eclipse.cdt.testplugin.TestPluginLauncher;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-
-public class CModelElementsTests extends TestCase {
- private ICProject fCProject;
- private IFile headerFile;
- private NullProgressMonitor monitor;
-
- public static void main(String[] args) {
- TestPluginLauncher.run(TestPluginLauncher.getLocationFromProperties(), WorkingCopyTests.class, args);
- }
-
- public static Test suite() {
- TestSuite suite= new TestSuite();
- suite.addTest(new CModelElementsTests("testCModelElements"));
- return suite;
- }
-
- public CModelElementsTests(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- monitor = new NullProgressMonitor();
- String pluginRoot=org.eclipse.core.runtime.Platform.getPlugin("org.eclipse.cdt.ui.tests").find(new Path("/")).getFile();
-
- fCProject= CProjectHelper.createCProject("TestProject1", "bin");
- headerFile = fCProject.getProject().getFile("CModelElementsTest.h");
- if (!headerFile.exists()) {
- try{
- FileInputStream fileIn = new FileInputStream(pluginRoot+ "model/org/eclipse/cdt/core/model/tests/resources/cfiles/CModelElementsTestStart.h");
- headerFile.create(fileIn,false, monitor);
- } catch (CoreException e) {
- e.printStackTrace();
- }
- }
- CCorePlugin.getDefault().setUseNewParser(true);
-
- }
-
- protected void tearDown() throws Exception {
- CProjectHelper.delete(fCProject);
- }
-
- public void testCModelElements(){
- TranslationUnit tu = new TranslationUnit(fCProject, headerFile);
- // parse the translation unit to get the elements tree
- tu.parse();
-
- // tu ---> namespace MyPackage
- ArrayList tuPackages = tu.getChildrenOfType(ICElement.C_NAMESPACE);
- INamespace namespace = (INamespace) tuPackages.get(0);
- assertEquals(namespace.getElementName(), new String("MyPackage"));
-
- // MyPackage ---> class Hello
- ArrayList nsClassChildren = namespace.getChildrenOfType(ICElement.C_CLASS);
- IStructure classHello = (IStructure) nsClassChildren.get(0);
- assertEquals(classHello.getElementName(), new String("Hello"));
-
- // Hello --> int x
- ArrayList helloFieldChildren = classHello.getChildrenOfType(ICElement.C_FIELD);
- IField intX = (IField) helloFieldChildren.get(0);
- assertEquals(intX.getElementName(), new String("x"));
- int visibility = intX.getVisibility();
- if (visibility != IMember.V_PROTECTED)
- fail("visibility should be protected!");
-
-
- // Hello ---> void setX(int X)
- ArrayList helloMethodChildren = classHello.getChildrenOfType(ICElement.C_METHOD);
- IMethod setX = (IMethod) helloMethodChildren.get(0);
- assertEquals(setX.getElementName(), new String("setX"));
- int setXNumOfParam = setX.getNumberOfParameters();
- if(setXNumOfParam != 1)
- fail("setX should have one parameter!");
- String[] setXParamTypes = setX.getParameterTypes();
- String firstParamType = setXParamTypes[0];
- assertEquals(firstParamType, new String("int"));
- }
-
-}
diff --git a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/CModelExceptionTest.java b/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/CModelExceptionTest.java
deleted file mode 100644
index 19261d83846..00000000000
--- a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/CModelExceptionTest.java
+++ /dev/null
@@ -1,113 +0,0 @@
-package org.eclipse.cdt.core.model.tests;
-
-/*
- * (c) Copyright QNX Software Systems Ltd. 2002.
- * All Rights Reserved.
- */
-
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-import org.eclipse.cdt.core.model.CModelException;
-import org.eclipse.cdt.core.model.ICModelStatusConstants;
-import org.eclipse.cdt.internal.core.model.CModelStatus;
-import org.eclipse.core.runtime.CoreException;
-
-/**
- *
- * CModelExceptionTest
- *
- * @author Judy N. Green
- * @since Jul 19, 2002
- */
-public class CModelExceptionTest extends TestCase {
- // Shared values setup and torn down
- private Throwable throwableException;
- private CModelStatus cModelStatus;
- private CoreException coreException;
-
- /**
- * Constructor for TestCModelException.
- * @param name
- */
- public CModelExceptionTest(String name) {
- super(name);
- }
-
- /**
- * 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() {
- // create shared resources and setup the test fixture
- cModelStatus = new CModelStatus();
- coreException = new CoreException(cModelStatus);
- }
-
- /**
- * Tears down the test fixture.
- *
- * Called after every test case method.
- */
- protected void tearDown() {
- // release resources here and clean-up
- }
-
- public static TestSuite suite() {
- return new TestSuite(CModelExceptionTest.class);
- }
-
- public static void main (String[] args){
- junit.textui.TestRunner.run(suite());
- }
-
- public void testCreationNoStatus(){
- CModelException testException = new CModelException(coreException);
-
- // should not be null
- assertTrue("TestException is null", (testException != null));
-
- // should be the same object inside
- assertTrue("Object compare failed", testException.getException() == coreException);
- }
- public void testCreationWithStatus(){
- CModelException testException = new CModelException(coreException,
- ICModelStatusConstants.INDEX_OUT_OF_BOUNDS);
- // should not be null
- assertTrue("TestException is null", (testException != null));
-
- // should not be null
- assertTrue("TestException.getStatus() is null", (testException.getStatus() != null));
-
- // should have the same status as was set on creation
- assertTrue("Object compare failed", testException.getStatus().getCode() == ICModelStatusConstants.INDEX_OUT_OF_BOUNDS);
- }
-
- public void testElementDoesNotExist(){
- CModelException testException = new CModelException(coreException,
- ICModelStatusConstants.ELEMENT_DOES_NOT_EXIST);
- // should not be null
- assertTrue("TestException is null", (testException != null));
-
-
- // should not exist since this is the value we set on creation
- assertTrue("Object unexpectedly exists", testException.doesNotExist());
- }
-
- public void testElementExists(){
- CModelException testException = new CModelException(coreException,
- ICModelStatusConstants.INVALID_CONTENTS);
- // should not be null
- assertTrue("TestException is null", (testException != null));
-
-
- // should not exist since this is the value we set on creation
- assertTrue("Object unexpectedly does not exist", testException.doesNotExist() == false);
- }
-
-
-}
diff --git a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/CModelTests.java b/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/CModelTests.java
deleted file mode 100644
index 62b9bdecfbf..00000000000
--- a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/CModelTests.java
+++ /dev/null
@@ -1,222 +0,0 @@
-package org.eclipse.cdt.core.model.tests;
-
-/*
- * (c) Copyright QNX Software Systems Ltd. 2002.
- * All Rights Reserved.
- */
-
-
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-import org.eclipse.cdt.testplugin.*;
-import org.eclipse.cdt.core.CCProjectNature;
-import org.eclipse.cdt.core.model.*;
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-
-
-/**
- * @author Peter Graves
- *
- * This file contains a set of generic tests for the core C model. Nothing
- * exotic, but should be a small sanity set of tests.
- *
- */
-public class CModelTests extends TestCase {
- IWorkspace workspace;
- IWorkspaceRoot root;
- IProject project_c, project_cc;
- NullProgressMonitor monitor;
- String pluginRoot;
-
- /**
- * Constructor for CModelTests.
- * @param name
- */
- public CModelTests(String name) {
- super(name);
- }
-
- /**
- * 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 {
- /***
- * The test of the tests 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.
- */
- IWorkspaceDescription desc;
- 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");
- pluginRoot=org.eclipse.core.runtime.Platform.getPlugin("org.eclipse.cdt.ui.tests").find(new Path("/")).getFile();
- desc=workspace.getDescription();
- desc.setAutoBuilding(false);
- workspace.setDescription(desc);
-
- }
-
- /**
- * Tears down the test fixture.
- *
- * Called after every test case method.
- */
- protected void tearDown() {
- // release resources here and clean-up
- }
-
- public static TestSuite suite() {
- return new TestSuite(CModelTests.class);
- }
-
- public static void main (String[] args){
- junit.textui.TestRunner.run(suite());
- }
-
-
- /***
- * The follow are a simple set of tests to make usre the HasC/CCNature calls
- * seem to be sane.
- *
- * Assumes that the CProjectHelper.createCProject properly creates a C
- * project with a C nature, but does not add the CC nature.
- * It also assums that the AddCCNature call works
- *
- * @see CProjectHelper#createCProject
- * @see CoreModel#addCCNature
- */
- public void testHasNature() throws CoreException {
- ICProject testProject;
- testProject=CProjectHelper.createCProject("naturetest", "none");
- if (testProject==null)
- fail("Unable to create project");
- assertTrue("hasCNature works", CoreModel.getDefault().hasCNature(testProject.getProject()));
- assertTrue("hasCCNature works without ccnature", !(CoreModel.getDefault().hasCCNature(testProject.getProject())));
-
-
- CCProjectNature.addCCNature(testProject.getProject(), monitor);
- assertTrue("hasCCNature works", (CoreModel.getDefault().hasCCNature(testProject.getProject())));
-
- CCProjectNature.removeCCNature(testProject.getProject(), monitor);
- CCProjectNature.removeCNature(testProject.getProject(), monitor);
- assertTrue("hasCNature works without cnature", !CoreModel.getDefault().hasCNature(testProject.getProject()));
- assertTrue("hasCCNature works without ccnature or cnature", !(CoreModel.getDefault().hasCCNature(testProject.getProject())));
-
- }
-
- /***
- * Simple tests to make sure the models file identification methods seem
- * to work as expected.
- */
- public void testFileType() throws CoreException,FileNotFoundException {
- ICProject testProject;
- testProject=CProjectHelper.createCProject("filetest", "none");
- if (testProject==null)
- fail("Unable to create project");
-
- IFile file = testProject.getProject().getFile("exetest_g");
- if (!file.exists()) {
- file.create(new FileInputStream(pluginRoot+"model/org/eclipse/cdt/core/model/tests/resources/exe/x86/o.g/exe_g"),false, monitor);
-
- }
- /***
- * file should be a binary, executable, not shared or archive
- */
- assertTrue("isBinary", CoreModel.getDefault().isBinary(file));
- assertTrue("isExecutable", CoreModel.getDefault().isExecutable(file));
- assertTrue("isSharedLib", !CoreModel.getDefault().isSharedLib(file));
- assertTrue("isArchive", !CoreModel.getDefault().isArchive(file));
- assertTrue("isObject", !CoreModel.getDefault().isObject(file));
- assertTrue("isTranslationUnit", !CoreModel.getDefault().isTranslationUnit(file));
-
-
- file = testProject.getProject().getFile("exetest.c");
- if (!file.exists()) {
- file.create(new FileInputStream(pluginRoot+"model/org/eclipse/cdt/core/model/tests/resources/exe/main.c"),false, monitor);
-
- }
- /***
- * file should be a translation unit
- */
- assertTrue("isBinary", !CoreModel.getDefault().isBinary(file));
- assertTrue("isExecutable", !CoreModel.getDefault().isExecutable(file));
- assertTrue("isSharedLib", !CoreModel.getDefault().isSharedLib(file));
- assertTrue("isArchive", !CoreModel.getDefault().isArchive(file));
- assertTrue("isObject", !CoreModel.getDefault().isObject(file));
- assertTrue("isTranslationUnit", CoreModel.getDefault().isTranslationUnit(file));
-
- file = testProject.getProject().getFile("exetest.o");
- if (!file.exists()) {
- file.create(new FileInputStream(pluginRoot+"model/org/eclipse/cdt/core/model/tests/resources/exe/x86/o.g/main.o"),false, monitor);
-
- }
- /***
- * file should be a object file unit
- */
- assertTrue("isBinary", CoreModel.getDefault().isBinary(file));
- assertTrue("isExecutable", !CoreModel.getDefault().isExecutable(file));
- assertTrue("isSharedLib", !CoreModel.getDefault().isSharedLib(file));
- assertTrue("isArchive", !CoreModel.getDefault().isArchive(file));
- assertTrue("isObject", CoreModel.getDefault().isObject(file));
- assertTrue("isTranslationUnit", !CoreModel.getDefault().isTranslationUnit(file));
-
- file = testProject.getProject().getFile("liblibtest_g.so");
- if (!file.exists()) {
- file.create(new FileInputStream(pluginRoot+"model/org/eclipse/cdt/core/model/tests/resources/testlib/x86/so.g/libtestlib_g.so"),false, monitor);
-
- }
- /***
- * file should be a sharedlib/binary file
- */
- assertTrue("isBinary", CoreModel.getDefault().isBinary(file));
- assertTrue("isExecutable", !CoreModel.getDefault().isExecutable(file));
- assertTrue("isSharedLib", CoreModel.getDefault().isSharedLib(file));
- assertTrue("isArchive", !CoreModel.getDefault().isArchive(file));
- assertTrue("isObject", !CoreModel.getDefault().isObject(file));
- assertTrue("isTranslationUnit", !CoreModel.getDefault().isTranslationUnit(file));
-
- file = testProject.getProject().getFile("liblibtest_g.a");
- if (!file.exists()) {
- file.create(new FileInputStream(pluginRoot+"model/org/eclipse/cdt/core/model/tests/resources/testlib/x86/a.g/libtestlib_g.a"),false, monitor);
-
- } else {
- fail("Does not exist?");
- }
- /***
- * file should be a archive file
- */
- assertTrue("isArchive", CoreModel.getDefault().isArchive(file));
- assertTrue("isBinary:", !CoreModel.getDefault().isBinary(file));
- assertTrue("isExecutable", !CoreModel.getDefault().isExecutable(file));
- assertTrue("isSharedLib", !CoreModel.getDefault().isSharedLib(file));
- assertTrue("isArchive", CoreModel.getDefault().isArchive(file));
- assertTrue("isObject", !CoreModel.getDefault().isObject(file));
- assertTrue("isTranslationUnit", !CoreModel.getDefault().isTranslationUnit(file));
-
-
- testProject.getProject().delete(true,true,monitor);
- }
-
- /****
- * Some simple tests for isValidTranslationUnitName
- */
- public void testIsValidTranslationUnitName() throws CoreException {
- assertTrue("Invalid C file", !CoreModel.getDefault().isValidTranslationUnitName("notcfile"));
- assertTrue("Invalid C file", !CoreModel.getDefault().isValidTranslationUnitName("not.c.file"));
- assertTrue("Invalid C file", !CoreModel.getDefault().isValidTranslationUnitName("not.ca"));
- assertTrue("Valid C file", CoreModel.getDefault().isValidTranslationUnitName("areal.c"));
- }
-}
diff --git a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/ElementDeltaTests.java b/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/ElementDeltaTests.java
deleted file mode 100644
index e05d2a066eb..00000000000
--- a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/ElementDeltaTests.java
+++ /dev/null
@@ -1,245 +0,0 @@
-package org.eclipse.cdt.core.model.tests;
-
-
-/**********************************************************************
- * Copyright (c) 2002,2003 Rational Software Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * Rational Software - Initial API and implementation
-***********************************************************************/
-
-import java.io.FileInputStream;
-import java.util.Iterator;
-import java.util.Vector;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-import org.eclipse.cdt.core.CCorePlugin;
-import org.eclipse.cdt.core.model.CModelException;
-import org.eclipse.cdt.core.model.ElementChangedEvent;
-import org.eclipse.cdt.core.model.IBuffer;
-import org.eclipse.cdt.core.model.ICElement;
-import org.eclipse.cdt.core.model.ICElementDelta;
-import org.eclipse.cdt.core.model.ICProject;
-import org.eclipse.cdt.core.model.IElementChangedListener;
-import org.eclipse.cdt.core.model.ITranslationUnit;
-import org.eclipse.cdt.internal.core.model.CModelManager;
-import org.eclipse.cdt.internal.core.model.IWorkingCopy;
-import org.eclipse.cdt.internal.core.model.TranslationUnit;
-import org.eclipse.cdt.testplugin.CProjectHelper;
-import org.eclipse.cdt.testplugin.TestPluginLauncher;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-
-/**
- * Class for testing the C Element Delta Builder.
- */
-public class ElementDeltaTests extends TestCase implements IElementChangedListener {
- private ICProject fCProject;
- private IFile headerFile;
- private NullProgressMonitor monitor;
- private Vector addedElements;
- private Vector removedElements;
- private Vector changedElements;
-
- public static void main(String[] args) {
- TestPluginLauncher.run(TestPluginLauncher.getLocationFromProperties(), WorkingCopyTests.class, args);
- }
-
- public static Test suite() {
- TestSuite suite= new TestSuite();
- suite.addTest(new ElementDeltaTests("testElementDeltas"));
- return suite;
- }
-
- public ElementDeltaTests(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- monitor = new NullProgressMonitor();
- String pluginRoot=org.eclipse.core.runtime.Platform.getPlugin("org.eclipse.cdt.ui.tests").find(new Path("/")).getFile();
-
- fCProject= CProjectHelper.createCProject("TestProject1", "bin");
- //Path filePath = new Path(ResourcesPlugin.getWorkspace().getRoot().getLocation().toString()+ fCProject.getPath().toString()+ "/WorkingCopyTest.h");
- headerFile = fCProject.getProject().getFile("WorkingCopyTest.h");
- if (!headerFile.exists()) {
- try{
- FileInputStream fileIn = new FileInputStream(pluginRoot+ "model/org/eclipse/cdt/core/model/tests/resources/cfiles/WorkingCopyTestStart.h");
- headerFile.create(fileIn,false, monitor);
- } catch (CoreException e) {
- e.printStackTrace();
- }
- }
-
- // register with the model manager to listen to delta changes
- CModelManager.getDefault().addElementChangedListener(this);
- addedElements = new Vector(10);
- removedElements = new Vector(10);
- changedElements = new Vector(100);
- CCorePlugin.getDefault().setUseNewParser(true);
- }
-
- protected void tearDown() throws Exception {
- CProjectHelper.delete(fCProject);
- }
-
-
- public void testElementDeltas() throws Exception {
- ITranslationUnit tu = new TranslationUnit(fCProject, headerFile);
- assertNotNull (tu);
- IWorkingCopy wc = tu.getWorkingCopy();
- assertNotNull (wc);
- assertNotNull (wc.getBuffer());
- assertTrue (wc.exists());
-
- // add the class Hello
- IBuffer wcBuf = wc.getBuffer();
- wcBuf.setContents ("\n class Hello{ \n};");
- wc.reconcile();
- wc.commit(true, monitor);
- assertAddedElement(ICElement.C_CLASS, "Hello");
-
- // add the field x
- wcBuf.setContents ("\n class Hello{\n int x; \n};");
- wc.reconcile();
- wc.commit(true, monitor);
- assertAddedElement(ICElement.C_FIELD, "x");
-
- // add the method setValue
- wcBuf.setContents ("\n class Hello{\n int x; \n void setValue(int val); \n};");
- wc.reconcile();
- wc.commit(true, monitor);
- assertAddedElement(ICElement.C_METHOD, "setValue");
-
- // rename x to y
- // this is not a change, this is add and remove
- wcBuf.setContents ("\n class Hello{\n int y; \n void setValue(int val); \n};");
- wc.reconcile();
- wc.commit(true, monitor);
- assertAddedElement(ICElement.C_FIELD, "y");
- assertRemovedElement(ICElement.C_FIELD, "x");
-
- // remove the method
- wcBuf.setContents ("\n class Hello{\n String y; \n};");
- wc.reconcile();
- wc.commit(true, monitor);
- assertRemovedElement(ICElement.C_METHOD, "setValue");
-
- // remove the field
- wcBuf.setContents ("\n class Hello{ \n};");
- wc.reconcile();
- wc.commit(true, monitor);
- assertRemovedElement(ICElement.C_FIELD, "y");
-
- // remove the class
- wcBuf.setContents ("");
- wc.reconcile();
- wc.commit(true, monitor);
- assertRemovedElement(ICElement.C_CLASS, "Hello");
-
- wc.destroy();
- assertFalse(wc.exists());
- }
-
- public void assertAddedElement(int elementType, String elementName){
- System.out.println("Printing Added List: ");
- if(!isElementInList(elementType, elementName, addedElements))
- fail("Element NOT found in Added list");
- }
- public void assertRemovedElement(int elementType, String elementName){
- System.out.println("Printing Removed List: ");
- if(!isElementInList(elementType, elementName, removedElements))
- fail("Element NOT found in Removed list");
- }
- public void assertChangedElement(int elementType, String elementName){
- System.out.println("Printing Changed List: ");
- if(!isElementInList(elementType, elementName, changedElements))
- fail("Element NOT found in Changed list");
- }
- public boolean isElementInList(int elementType, String elementName, Vector elementList) {
- boolean found = false;
- Iterator i = elementList.iterator();
- while( i.hasNext()){
- ICElement element = (ICElement)i.next();
-
- System.out.print("ElementName " + element.getElementName());
- System.out.println(" ElementType " + element.getElementType());
-
- if ((element.getElementName().equals(elementName)) &&
- (element.getElementType() == elementType)){
- // return true;
- // just to print the whole list
- found = true;
- }
- }
- //return false;
- return found;
- }
-
- public void elementChanged(ElementChangedEvent event){
- try {
- addedElements.clear();
- removedElements.clear();
- changedElements.clear();
-
- processDelta(event.getDelta());
- } catch(CModelException e) {
- }
- }
-
- protected void processDelta(ICElementDelta delta) throws CModelException {
- // check the delta elements
- int kind= delta.getKind();
- int flags= delta.getFlags();
- ICElement element= delta.getElement();
-
- System.out.print("Processing " + element);
- // handle open and closing of a solution or project
- if ((flags & ICElementDelta.F_CLOSED) != 0) {
- System.out.println(" Element Closed");
- }
- if ((flags & ICElementDelta.F_OPENED) != 0) {
- System.out.println(" Element Opened");
- }
-
- if (kind == ICElementDelta.REMOVED) {
- System.out.println(" Element Removed");
- removedElements.add(element);
- }
-
- if (kind == ICElementDelta.ADDED) {
- System.out.println(" Element Added");
- addedElements.add(element);
- }
-
- if (kind == ICElementDelta.CHANGED) {
- System.out.println(" Element Changed");
- changedElements.add(element);
-
- if (flags == ICElementDelta.F_MODIFIERS) {
- System.out.println(" Modifiers changed");
- }
- if (flags == ICElementDelta.F_CONTENT) {
- System.out.println(" Contents changed");
- }
- if (flags == ICElementDelta.F_CHILDREN) {
- System.out.println(" Children changed");
- }
- }
-
- ICElementDelta[] affectedChildren= delta.getAffectedChildren();
- for (int i= 0; i < affectedChildren.length; i++) {
- processDelta(affectedChildren[i]);
- }
- }
-
-}
diff --git a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/FlagTests.java b/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/FlagTests.java
deleted file mode 100644
index 9da06490c36..00000000000
--- a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/FlagTests.java
+++ /dev/null
@@ -1,212 +0,0 @@
-package org.eclipse.cdt.core.model.tests;
-
-/*
- * (c) Copyright QNX Software Systems Ltd. 2002.
- * All Rights Reserved.
- */
-
-
-
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-import org.eclipse.cdt.core.model.Flags;
-import org.eclipse.cdt.internal.core.model.IConstants;
-
-/**
- * @author Peter Graves
- *
- * This is a very simple set of sanity tests for the flags class to make sure
- * there are no very silly problems in the class. It also verifies that there
- * is no overlap in the IConstants.
- */
-public class FlagTests extends TestCase {
-
- int flags[];
- /**
- * Constructor for FlagTests.
- * @param name
- */
- public FlagTests(String name) {
- super(name);
- }
- /**
- * 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() {
- flags=new int[15];
- flags[0]=IConstants.AccPublic;
- flags[1]=IConstants.AccPrivate;
- flags[2]=IConstants.AccProtected;
- flags[3]=IConstants.AccStatic;
- flags[4]=IConstants.AccExtern;
- flags[5]=IConstants.AccInline;
- flags[6]=IConstants.AccVolatile;
- flags[7]=IConstants.AccRegister;
- flags[8]=IConstants.AccExplicit;
- flags[9]=IConstants.AccExport;
- flags[10]=IConstants.AccAbstract;
- flags[11]=IConstants.AccMutable;
- flags[12]=IConstants.AccAuto;
- flags[13]=IConstants.AccVirtual;
- flags[14]=IConstants.AccTypename;
-
- }
-
- /**
- * Tears down the test fixture.
- *
- * Called after every test case method.
- */
- protected void tearDown() {
- // release resources here and clean-up
- }
-
- public static TestSuite suite() {
- return new TestSuite(FlagTests.class);
- }
-
- public static void main (String[] args){
- junit.textui.TestRunner.run(suite());
- }
-
- public void testIsStatic()
- {
- int x;
- assertTrue("isStatic with a static", Flags.isStatic(IConstants.AccStatic));
- for (x=0;x<flags.length;x++) {
- if (flags[x]!=IConstants.AccStatic)
- assertTrue("isStatic with a non-static", !Flags.isStatic(flags[x]));
- }
- }
-
- public void testIsAbstract()
- {
- int x;
- assertTrue("isAbstract with a abstract", Flags.isAbstract(IConstants.AccAbstract));
- for (x=0;x<flags.length;x++) {
- if (flags[x]!=IConstants.AccAbstract)
- assertTrue("isAbstract with a non-abstract", !Flags.isAbstract(flags[x]));
- }
- }
-
- public void testIsExplicit()
- {
- int x;
- assertTrue("isExplicit with a explicit", Flags.isExplicit(IConstants.AccExplicit));
- for (x=0;x<flags.length;x++) {
- if (flags[x]!=IConstants.AccExplicit)
- assertTrue("isExplicit with a non-explicit", !Flags.isExplicit(flags[x]));
- }
- }
-
- public void testIsExport()
- {
- int x;
- assertTrue("isExport with a Export", Flags.isExport(IConstants.AccExport));
- for (x=0;x<flags.length;x++) {
- if (flags[x]!=IConstants.AccExport)
- assertTrue("isExport with a non-Export", !Flags.isExport(flags[x]));
- }
- }
- public void testIsExtern()
- {
- int x;
- assertTrue("isExtern with a Extern", Flags.isExtern(IConstants.AccExtern));
- for (x=0;x<flags.length;x++) {
- if (flags[x]!=IConstants.AccExtern)
- assertTrue("isExtern with a non-Extern", !Flags.isExtern(flags[x]));
- }
- }
-
- public void testIsInline()
- {
- int x;
- assertTrue("isInline with a Inline", Flags.isInline(IConstants.AccInline));
- for (x=0;x<flags.length;x++) {
- if (flags[x]!=IConstants.AccInline)
- assertTrue("isInline with a non-Inline", !Flags.isInline(flags[x]));
- }
- }
-
- public void testIsMutable()
- {
- int x;
- assertTrue("isMutable with a Mutable", Flags.isMutable(IConstants.AccMutable));
- for (x=0;x<flags.length;x++) {
- if (flags[x]!=IConstants.AccMutable)
- assertTrue("isMutable with a non-Mutable", !Flags.isMutable(flags[x]));
- }
- }
-
- public void testIsPrivate()
- {
- int x;
- assertTrue("isPrivate with a Private", Flags.isPrivate(IConstants.AccPrivate));
- for (x=0;x<flags.length;x++) {
- if (flags[x]!=IConstants.AccPrivate)
- assertTrue("isPrivate with a non-Private", !Flags.isPrivate(flags[x]));
- }
- }
-
- public void testIsPublic()
- {
- int x;
- assertTrue("isPublic with a Public", Flags.isPublic(IConstants.AccPublic));
- for (x=0;x<flags.length;x++) {
- if (flags[x]!=IConstants.AccPublic)
- assertTrue("isPublic with a non-Public", !Flags.isPublic(flags[x]));
- }
- }
-
- public void testIsProtected()
- {
- int x;
- assertTrue("isProtected with a Protected", Flags.isProtected(IConstants.AccProtected));
- for (x=0;x<flags.length;x++) {
- if (flags[x]!=IConstants.AccProtected)
- assertTrue("isProtected with a non-Protected", !Flags.isProtected(flags[x]));
- }
- }
-
- public void testIsRegister()
- {
- int x;
- assertTrue("isRegister with a Register", Flags.isRegister(IConstants.AccRegister));
- for (x=0;x<flags.length;x++) {
- if (flags[x]!=IConstants.AccRegister)
- assertTrue("isRegister with a non-Register", !Flags.isRegister(flags[x]));
- }
- }
-
- public void testIsVirtual()
- {
- int x;
- assertTrue("isVirtual with a Virtual", Flags.isVirtual(IConstants.AccVirtual));
- for (x=0;x<flags.length;x++) {
- if (flags[x]!=IConstants.AccVirtual)
- assertTrue("isVirtual with a non-Virtual", !Flags.isVirtual(flags[x]));
- }
- }
-
- public void testIsVolatile()
- {
- int x;
- assertTrue("isVolatile with a Volatile", Flags.isVolatile(IConstants.AccVolatile));
- for (x=0;x<flags.length;x++) {
- if (flags[x]!=IConstants.AccVolatile)
- assertTrue("isVolatile with a non-Volatile", !Flags.isVolatile(flags[x]));
- }
- }
-
-
-
-
-
-
-}
diff --git a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/TranslationUnitTests.java b/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/TranslationUnitTests.java
deleted file mode 100644
index 5cf0e56fd72..00000000000
--- a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/TranslationUnitTests.java
+++ /dev/null
@@ -1,298 +0,0 @@
-package org.eclipse.cdt.core.model.tests;
-
-/*
- * (c) Copyright QNX Software Systems Ltd. 2002.
- * All Rights Reserved.
- */
-
-
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.util.Stack;
-
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-import org.eclipse.cdt.testplugin.*;
-import org.eclipse.cdt.testplugin.util.*;
-import org.eclipse.cdt.core.model.*;
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-
-
-
-/**
- * @author Peter Graves
- *
- * This file contains a set of generic tests for the core C model's TranslationUnit
- * class. There is nothing exotic here, mostly just sanity type tests
- *
- */
-public class TranslationUnitTests extends TestCase {
- IWorkspace workspace;
- IWorkspaceRoot root;
- ICProject testProject;
- IFile cfile, exefile, libfile, archfile, objfile;
- Path cpath, exepath, libpath, archpath, objpath;
- NullProgressMonitor monitor;
-
- /* This is a list of elements in the test .c file. It will be used
- * in a number of places in the tests
- */
- String[] expectedStringList= {"stdio.h", "unistd.h", "func2p",
- "globalvar", "myenum", "mystruct", "mystruct_t", "myunion", "mytype",
- "func1", "func2", "main", "func3"};
- int[] expectedLines={ 12,14,17,20,23,28,32,35,42,47,53,58,65};
- /* This is a list of that the types of the above list of elements is
- * expected to be.
- */
- int[] expectedTypes= { ICElement.C_INCLUDE, ICElement.C_INCLUDE,
- ICElement.C_FUNCTION_DECLARATION, ICElement.C_VARIABLE,
- ICElement.C_ENUMERATION, ICElement.C_STRUCT, ICElement.C_TYPEDEF,
- ICElement.C_UNION, ICElement.C_TYPEDEF, ICElement.C_FUNCTION,
- ICElement.C_FUNCTION, ICElement.C_FUNCTION,ICElement.C_FUNCTION};
-
-
- /**
- * Constructor for TranslationUnitTests
- * @param name
- */
- public TranslationUnitTests(String name) {
- super(name);
- }
-
- /**
- * 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 {
- /***
- * The rest of the tests 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.
- */
- IWorkspaceDescription desc;
- String pluginRoot=org.eclipse.core.runtime.Platform.getPlugin("org.eclipse.cdt.ui.tests").find(new Path("/")).getFile();
- 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");
-
- desc=workspace.getDescription();
- desc.setAutoBuilding(false);
- workspace.setDescription(desc);
-
- /***
- * Setup the various files, paths and projects that are needed by the
- * tests
- */
-
- testProject=CProjectHelper.createCProject("filetest", "none");
- if (testProject==null)
- fail("Unable to create project");
-
- cfile = testProject.getProject().getFile("exetest.c");
- if (!cfile.exists()) {
- cfile.create(new FileInputStream(pluginRoot+"model/org/eclipse/cdt/core/model/tests/resources/cfiles/TranslationUnits.c"),false, monitor);
-
- }
- cpath=new Path(workspace.getRoot().getLocation()+"/filetest/main.c");
-
- objfile = testProject.getProject().getFile("exetest.o");
- if (!objfile.exists()) {
- objfile.create(new FileInputStream(pluginRoot+"model/org/eclipse/cdt/core/model/tests/resources/exe/x86/o.g/main.o"),false, monitor);
-
- }
- objpath=new Path(workspace.getRoot().getLocation()+"/filetest/main.o");
-
- exefile = testProject.getProject().getFile("test_g");
- if (!exefile.exists()) {
- exefile.create(new FileInputStream(pluginRoot+"model/org/eclipse/cdt/core/model/tests/resources/exe/x86/o.g/exe_g"),false, monitor);
-
- }
- exepath=new Path(workspace.getRoot().getLocation()+"/filetest/exe_g");
-
- archfile = testProject.getProject().getFile("libtestlib_g.a");
- if (!archfile.exists()) {
- archfile.create(new FileInputStream(pluginRoot+"model/org/eclipse/cdt/core/model/tests/resources/testlib/x86/a.g/libtestlib_g.a"),false, monitor);
-
- }
- libpath=new Path(workspace.getRoot().getLocation()+"/filetest/libtestlib_g.so");
-
- libfile = testProject.getProject().getFile("libtestlib_g.so");
- if (!libfile.exists()) {
- libfile.create(new FileInputStream(pluginRoot+"model/org/eclipse/cdt/core/model/tests/resources/testlib/x86/so.g/libtestlib_g.so"),false, monitor);
-
- }
- archpath=new Path(workspace.getRoot().getLocation()+"/filetest/libtestlib_g.a");
-
-
- }
-
- /**
- * Tears down the test fixture.
- *
- * Called after every test case method.
- */
- protected void tearDown() throws CoreException {
- // release resources here and clean-up
- testProject.getProject().delete(true,true,monitor);
- }
-
- public static TestSuite suite() {
- return new TestSuite(TranslationUnitTests.class);
- }
-
- public static void main (String[] args){
- junit.textui.TestRunner.run(suite());
- }
-
-
-
-
- /***
- * Simple sanity test to make sure TranslationUnit.isTranslationUnit returns true
- *
- */
- public void testIsTranslationUnit() throws CoreException,FileNotFoundException {
- ITranslationUnit myTranslationUnit;
-
- myTranslationUnit=CProjectHelper.findTranslationUnit(testProject,"exetest.c");
- assertTrue("A TranslationUnit", myTranslationUnit != null);
-
- }
-
- /***
- * Simple sanity tests to make sure TranslationUnit.getChildren seems to
- * basicly work
- */
- public void testGetChildern() {
- ITranslationUnit myTranslationUnit;
- ICElement[] elements;
- int x;
-
- ExpectedStrings expectedString=new ExpectedStrings(expectedStringList);
-
- myTranslationUnit=CProjectHelper.findTranslationUnit(testProject,"exetest.c");
-
-
- if (myTranslationUnit.hasChildren()) {
- elements=myTranslationUnit.getChildren();
- for (x=0;x<elements.length;x++) {
- expectedString.foundString(elements[x].getElementName());
- }
- }
- assertTrue("PR:23603 " +expectedString.getMissingString(),expectedString.gotAll());
- assertTrue(expectedString.getExtraString(),!expectedString.gotExtra());
-
- }
-
- /***
- * Simple sanity tests for the getElement() call
- */
- public void testGetElement() throws CModelException {
- ITranslationUnit myTranslationUnit;
- ICElement myElement;
- Stack missing=new Stack();
- int x;
- myTranslationUnit=CProjectHelper.findTranslationUnit(testProject,"exetest.c");
-
- for (x=0;x<expectedStringList.length;x++) {
- myElement=myTranslationUnit.getElement(expectedStringList[x]);
- if (myElement==null)
- missing.push(expectedStringList[x]);
- else {
- assertTrue("Expected:" + expectedStringList[x] + " Got:" + myElement.getElementName(),
- expectedStringList[x].equals(myElement.getElementName()));
- }
-
- }
- if (!missing.empty()) {
- String output=new String("PR:23603 Could not get elements: ");
- while (!missing.empty())
- output+=missing.pop() + " ";
- assertTrue(output, false);
- }
-
- }
- /***
- * Simple sanity tests for the getElementAtLine() call
- */
- public void testGetElementAtLine() throws CoreException {
- ITranslationUnit myTranslationUnit;
- ICElement myElement;
- Stack missing=new Stack();
- int x;
- myTranslationUnit=CProjectHelper.findTranslationUnit(testProject,"exetest.c");
-
- for (x=0;x<expectedStringList.length;x++) {
- myElement=myTranslationUnit.getElementAtLine(expectedLines[x]);
- if (myElement==null)
- missing.push(expectedStringList[x]);
- else {
- if (expectedStringList[x].equals("mystruct_t")) {
- assertTrue("PR:23603 expected:" + expectedStringList[x] + " Got:" + myElement.getElementName(),
- expectedStringList[x].equals(myElement.getElementName()));
- } else {
- assertTrue("Expected:" + expectedStringList[x] + " Got:" + myElement.getElementName(),
- expectedStringList[x].equals(myElement.getElementName()));
- }
-
- }
-
- }
- if (!missing.empty()) {
- String output=new String("PR: 23603 Could not get elements: ");
- while (!missing.empty())
- output+=missing.pop() + " ";
- assertTrue(output, false);
- }
-
- }
- /***
- * Simple sanity tests for the getInclude call
- */
- public void testGetInclude() {
- IInclude myInclude;
- int x;
- String includes[]={"stdio.h", "unistd.h"};
- ITranslationUnit myTranslationUnit=CProjectHelper.findTranslationUnit(testProject,"exetest.c");
-
- for (x=0;x<includes.length;x++) {
- myInclude=myTranslationUnit.getInclude(includes[x]);
- if (myInclude==null)
- fail("Unable to get include: " + includes[x]);
- else
- assertTrue("PR:23478 Expected:"+includes[x] +" Got:"+ myInclude.getIncludeName(), includes[x].equals(myInclude.getIncludeName()));
- }
-
-
- }
- /***
- * Simple sanity tests for the getIncludes call
- */
- public void testGetIncludes() throws CModelException {
- IInclude myIncludes[];
- String includes[]={"stdio.h", "unistd.h"};
- ExpectedStrings myExp= new ExpectedStrings(includes);
- int x;
- ITranslationUnit myTranslationUnit=CProjectHelper.findTranslationUnit(testProject,"exetest.c");
- fail("PR:23478 Unable to test because we can't get the name of an include file");
-
- myIncludes=myTranslationUnit.getIncludes();
- for (x=0;x<myIncludes.length;x++) {
- myExp.foundString(myIncludes[x].getIncludeName());
- }
- assertTrue(myExp.getMissingString(), myExp.gotAll());
- assertTrue(myExp.getExtraString(), !myExp.gotExtra());
-
-
- }
-
-}
diff --git a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/WorkingCopyTests.java b/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/WorkingCopyTests.java
deleted file mode 100644
index ca56cd87436..00000000000
--- a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/WorkingCopyTests.java
+++ /dev/null
@@ -1,106 +0,0 @@
-package org.eclipse.cdt.core.model.tests;
-/**********************************************************************
- * Copyright (c) 2002,2003 Rational Software Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * Rational Software - Initial API and implementation
-***********************************************************************/
-
-
-import java.io.FileInputStream;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-import org.eclipse.cdt.core.model.IBuffer;
-import org.eclipse.cdt.core.model.ICProject;
-import org.eclipse.cdt.core.model.ITranslationUnit;
-import org.eclipse.cdt.internal.core.model.IWorkingCopy;
-import org.eclipse.cdt.internal.core.model.TranslationUnit;
-import org.eclipse.cdt.testplugin.CProjectHelper;
-import org.eclipse.cdt.testplugin.TestPluginLauncher;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-
-/**
- * Contains unit test cases for Working Copies. Run using JUnit Plugin Test
- * configuration launcher.
- */
-public class WorkingCopyTests extends TestCase {
- private ICProject fCProject;
- private IFile headerFile;
- private NullProgressMonitor monitor;
-
- public static void main(String[] args) {
- TestPluginLauncher.run(TestPluginLauncher.getLocationFromProperties(), WorkingCopyTests.class, args);
- }
-
- public static Test suite() {
- TestSuite suite= new TestSuite();
- suite.addTest(new WorkingCopyTests("testWorkingCopy"));
- //suite.addTest(new WorkingCopyTests("testHashing"));
- return suite;
- }
-
- public WorkingCopyTests(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- monitor = new NullProgressMonitor();
- String pluginRoot=org.eclipse.core.runtime.Platform.getPlugin("org.eclipse.cdt.ui.tests").find(new Path("/")).getFile();
-
- fCProject= CProjectHelper.createCProject("TestProject1", "bin");
- //Path filePath = new Path(ResourcesPlugin.getWorkspace().getRoot().getLocation().toString()+ fCProject.getPath().toString()+ "/WorkingCopyTest.h");
- headerFile = fCProject.getProject().getFile("WorkingCopyTest.h");
- if (!headerFile.exists()) {
- try{
- FileInputStream fileIn = new FileInputStream(pluginRoot+ "model/org/eclipse/cdt/core/model/tests/resources/cfiles/WorkingCopyTestStart.h");
- headerFile.create(fileIn,false, monitor);
- } catch (CoreException e) {
- e.printStackTrace();
- }
- }
- }
-
- protected void tearDown() throws Exception {
- CProjectHelper.delete(fCProject);
- }
-
-
- public void testWorkingCopy() throws Exception {
- ITranslationUnit tu = new TranslationUnit(fCProject, headerFile);
- // CreateWorkingCopy
- assertNotNull (tu);
- IWorkingCopy wc = tu.getWorkingCopy();
- assertNotNull (wc);
- assertNotNull (wc.getBuffer());
- assertTrue (wc.exists());
-
- // ModifyWorkingCopy
- IBuffer wcBuf = wc.getBuffer();
- wcBuf.append("\n class Hello{ int x; };");
- if (tu.getBuffer().getContents().equals(wc.getBuffer().getContents() ) )
- fail("Buffers should NOT be equal at this point!");
-
- // ReconcileWorkingCopy
- wc.reconcile();
-
- // CommitWorkingCopy
- wc.commit(true, monitor);
-
- if(!tu.getBuffer().getContents().equals(wc.getBuffer().getContents()))
- fail("Buffers should be equal at this point!");
-
- // DestroyWorkingCopy
- wc.destroy();
- assertFalse(wc.exists());
- }
-} \ No newline at end of file
diff --git a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/cfiles/CModelElementsTestStart.h b/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/cfiles/CModelElementsTestStart.h
deleted file mode 100644
index 7c82da3c94b..00000000000
--- a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/cfiles/CModelElementsTestStart.h
+++ /dev/null
@@ -1,11 +0,0 @@
-#include <stdio.h>
-
-namespace MyPackage{
- class Hello{
- protected:
- int x;
- void setX(int X){
- x = X;
- };
- };
-}; \ No newline at end of file
diff --git a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/cfiles/TranslationUnits.c b/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/cfiles/TranslationUnits.c
deleted file mode 100644
index b4f8bf60115..00000000000
--- a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/cfiles/TranslationUnits.c
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * (c) Copyright QNX Software Systems Ltd. 2002.
- * All Rights Reserved.
- */
-/********
- * This is a sample C file that will be used in testing the TranslationUnit
- * class. It has a specific structure that will be looked for within the
- * test case.
- * This file is only ment to contain various C elements, and may not compile
- * into a running application (but should be valid C)
- */
-
-#include <stdio.h>
-#include <unistd.h>
-
-/* A function prototype */
-int func2p(void);
-
-/* A global variable */
-int globalvar;
-
-/* A enumeration */
-enum myenum {ENUM_A=1, ENUM_B=2, ENUM_C=3, ENUM_D=4};
-
-/* A structure. This also includes a typedef around the strcture def
- * which at the time of writing was not picked up.
- */
-typedef struct mystruct {
- int a;
- char b;
- long c;
-} mystruct_t;
-
-/* A union */
-union myunion {
- int x;
- char y;
- long z;
-};
-
-/* A typedef */
-typedef struct mystruct mytype;
-
-
-/* A couple functions */
-
-void * func1(void)
-{
- return(NULL);
-}
-
-
-int func2(void)
-{
- return(0);
-}
-
-int main(int argc, char ** argv)
-{
- int var1;
- printf("Hello world\n");
-}
-
-
-void func3()
-{
- printf("This is not really here\n");
-}
diff --git a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/cfiles/WorkingCopyTestStart.h b/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/cfiles/WorkingCopyTestStart.h
deleted file mode 100644
index 10b222ccb50..00000000000
--- a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/cfiles/WorkingCopyTestStart.h
+++ /dev/null
@@ -1,2 +0,0 @@
-#include <stdio.h>
-
diff --git a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/Makefile b/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/Makefile
deleted file mode 100644
index 0e22650c04c..00000000000
--- a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/Makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-LIST=VARIANT
-ifndef QRECURSE
-QRECURSE=recurse.mk
-ifdef QCONFIG
-QRDIR=$(dir $(QCONFIG))
-endif
-endif
-include $(QRDIR)$(QRECURSE)
diff --git a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/common.mk b/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/common.mk
deleted file mode 100644
index 6e21c521623..00000000000
--- a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/common.mk
+++ /dev/null
@@ -1,7 +0,0 @@
-ifndef QCONFIG
-QCONFIG=qconfig.mk
-endif
-include $(QCONFIG)
-USEFILE=
-LIBS+=socket
-include $(MKFILES_ROOT)/qtargets.mk
diff --git a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/main.c b/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/main.c
deleted file mode 100644
index 62952639754..00000000000
--- a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/main.c
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <stdio.h>
-
-int main()
-{
- printf("Hello there\n");
- return(0);
-}
diff --git a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/ppc/Makefile b/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/ppc/Makefile
deleted file mode 100644
index 0e22650c04c..00000000000
--- a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/ppc/Makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-LIST=VARIANT
-ifndef QRECURSE
-QRECURSE=recurse.mk
-ifdef QCONFIG
-QRDIR=$(dir $(QCONFIG))
-endif
-endif
-include $(QRDIR)$(QRECURSE)
diff --git a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/ppc/be.g/Makefile b/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/ppc/be.g/Makefile
deleted file mode 100644
index 2c760893e32..00000000000
--- a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/ppc/be.g/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-include ../../common.mk
diff --git a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/ppc/be.g/exe_g b/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/ppc/be.g/exe_g
deleted file mode 100644
index 1c54db11d20..00000000000
--- a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/ppc/be.g/exe_g
+++ /dev/null
Binary files differ
diff --git a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/ppc/be.g/main.o b/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/ppc/be.g/main.o
deleted file mode 100644
index 41e9e97110e..00000000000
--- a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/ppc/be.g/main.o
+++ /dev/null
Binary files differ
diff --git a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/ppc/be.g/test.o b/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/ppc/be.g/test.o
deleted file mode 100644
index 9a35dfb2cf9..00000000000
--- a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/ppc/be.g/test.o
+++ /dev/null
Binary files differ
diff --git a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/ppc/be.g/test2.o b/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/ppc/be.g/test2.o
deleted file mode 100644
index bae3191b475..00000000000
--- a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/ppc/be.g/test2.o
+++ /dev/null
Binary files differ
diff --git a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/test.c b/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/test.c
deleted file mode 100644
index 23baffafb31..00000000000
--- a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/test.c
+++ /dev/null
@@ -1,14 +0,0 @@
-#include <stdio.h>
-
-
-int func1 (void)
-{
- printf("This is func1\n");
- return(1);
-}
-
-char * func2(void)
-{
- printf("This is func2\n");
- return(0);
-}
diff --git a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/test2.c b/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/test2.c
deleted file mode 100644
index 7b26241b059..00000000000
--- a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/test2.c
+++ /dev/null
@@ -1,13 +0,0 @@
-#include <stdio.h>
-
-int test2func1(void)
-{
- printf("This is a function in the second object\n");
- return(1);
-}
-
-int test2func2(void)
-{
- printf("This is another function in the second object\n");
- return(2);
-}
diff --git a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/x86/Makefile b/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/x86/Makefile
deleted file mode 100644
index 0e22650c04c..00000000000
--- a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/x86/Makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-LIST=VARIANT
-ifndef QRECURSE
-QRECURSE=recurse.mk
-ifdef QCONFIG
-QRDIR=$(dir $(QCONFIG))
-endif
-endif
-include $(QRDIR)$(QRECURSE)
diff --git a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/x86/o.g/Makefile b/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/x86/o.g/Makefile
deleted file mode 100644
index 2c760893e32..00000000000
--- a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/x86/o.g/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-include ../../common.mk
diff --git a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/x86/o.g/exe_g b/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/x86/o.g/exe_g
deleted file mode 100644
index 465e16de33d..00000000000
--- a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/x86/o.g/exe_g
+++ /dev/null
Binary files differ
diff --git a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/x86/o.g/main.o b/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/x86/o.g/main.o
deleted file mode 100644
index 8c61c21f50d..00000000000
--- a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/x86/o.g/main.o
+++ /dev/null
Binary files differ
diff --git a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/x86/o.g/test.o b/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/x86/o.g/test.o
deleted file mode 100644
index 5f956885cbf..00000000000
--- a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/x86/o.g/test.o
+++ /dev/null
Binary files differ
diff --git a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/x86/o.g/test2.o b/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/x86/o.g/test2.o
deleted file mode 100644
index aa8de348603..00000000000
--- a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/x86/o.g/test2.o
+++ /dev/null
Binary files differ
diff --git a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/x86/o/Makefile b/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/x86/o/Makefile
deleted file mode 100644
index 2c760893e32..00000000000
--- a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/x86/o/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-include ../../common.mk
diff --git a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/x86/o/exe b/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/x86/o/exe
deleted file mode 100644
index d13631162d7..00000000000
--- a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/x86/o/exe
+++ /dev/null
Binary files differ
diff --git a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/x86/o/main.o b/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/x86/o/main.o
deleted file mode 100644
index a5c78c1ca4e..00000000000
--- a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/x86/o/main.o
+++ /dev/null
Binary files differ
diff --git a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/x86/o/test.o b/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/x86/o/test.o
deleted file mode 100644
index 357c3985ea1..00000000000
--- a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/x86/o/test.o
+++ /dev/null
Binary files differ
diff --git a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/x86/o/test2.o b/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/x86/o/test2.o
deleted file mode 100644
index 52e88a7397b..00000000000
--- a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exe/x86/o/test2.o
+++ /dev/null
Binary files differ
diff --git a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exebig/Makefile b/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exebig/Makefile
deleted file mode 100644
index 0e22650c04c..00000000000
--- a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exebig/Makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-LIST=VARIANT
-ifndef QRECURSE
-QRECURSE=recurse.mk
-ifdef QCONFIG
-QRDIR=$(dir $(QCONFIG))
-endif
-endif
-include $(QRDIR)$(QRECURSE)
diff --git a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exebig/common.mk b/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exebig/common.mk
deleted file mode 100644
index 80c1e67f6f8..00000000000
--- a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exebig/common.mk
+++ /dev/null
@@ -1,7 +0,0 @@
-ifndef QCONFIG
-QCONFIG=qconfig.mk
-endif
-include $(QCONFIG)
-USEFILE=
-
-include $(MKFILES_ROOT)/qtargets.mk
diff --git a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exebig/main.c b/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exebig/main.c
deleted file mode 100644
index ce93b899e09..00000000000
--- a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exebig/main.c
+++ /dev/null
@@ -1,8 +0,0 @@
-#include <stdio.h>
-int bigArray[100];
-int x[10]={1,2,3,4,5,6,7,8,9,0};
-int main()
-{
- printf("Hello there\n");
- return(0);
-}
diff --git a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exebig/x86/Makefile b/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exebig/x86/Makefile
deleted file mode 100644
index 0e22650c04c..00000000000
--- a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exebig/x86/Makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-LIST=VARIANT
-ifndef QRECURSE
-QRECURSE=recurse.mk
-ifdef QCONFIG
-QRDIR=$(dir $(QCONFIG))
-endif
-endif
-include $(QRDIR)$(QRECURSE)
diff --git a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exebig/x86/o.g/Makefile b/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exebig/x86/o.g/Makefile
deleted file mode 100644
index 2c760893e32..00000000000
--- a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exebig/x86/o.g/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-include ../../common.mk
diff --git a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exebig/x86/o.g/exebig_g b/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exebig/x86/o.g/exebig_g
deleted file mode 100644
index 3aacf6267c5..00000000000
--- a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exebig/x86/o.g/exebig_g
+++ /dev/null
Binary files differ
diff --git a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exebig/x86/o.g/main.o b/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exebig/x86/o.g/main.o
deleted file mode 100644
index e7d818de524..00000000000
--- a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/exebig/x86/o.g/main.o
+++ /dev/null
Binary files differ
diff --git a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/testlib/Makefile b/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/testlib/Makefile
deleted file mode 100644
index 0e22650c04c..00000000000
--- a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/testlib/Makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-LIST=VARIANT
-ifndef QRECURSE
-QRECURSE=recurse.mk
-ifdef QCONFIG
-QRDIR=$(dir $(QCONFIG))
-endif
-endif
-include $(QRDIR)$(QRECURSE)
diff --git a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/testlib/common.mk b/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/testlib/common.mk
deleted file mode 100644
index dd99ed569bc..00000000000
--- a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/testlib/common.mk
+++ /dev/null
@@ -1,6 +0,0 @@
-ifndef QCONFIG
-QCONFIG=qconfig.mk
-endif
-include $(QCONFIG)
-
-include $(MKFILES_ROOT)/qtargets.mk
diff --git a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/testlib/test.c b/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/testlib/test.c
deleted file mode 100644
index 23baffafb31..00000000000
--- a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/testlib/test.c
+++ /dev/null
@@ -1,14 +0,0 @@
-#include <stdio.h>
-
-
-int func1 (void)
-{
- printf("This is func1\n");
- return(1);
-}
-
-char * func2(void)
-{
- printf("This is func2\n");
- return(0);
-}
diff --git a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/testlib/test2.c b/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/testlib/test2.c
deleted file mode 100644
index 7b26241b059..00000000000
--- a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/testlib/test2.c
+++ /dev/null
@@ -1,13 +0,0 @@
-#include <stdio.h>
-
-int test2func1(void)
-{
- printf("This is a function in the second object\n");
- return(1);
-}
-
-int test2func2(void)
-{
- printf("This is another function in the second object\n");
- return(2);
-}
diff --git a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/testlib/x86/Makefile b/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/testlib/x86/Makefile
deleted file mode 100644
index 0e22650c04c..00000000000
--- a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/testlib/x86/Makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-LIST=VARIANT
-ifndef QRECURSE
-QRECURSE=recurse.mk
-ifdef QCONFIG
-QRDIR=$(dir $(QCONFIG))
-endif
-endif
-include $(QRDIR)$(QRECURSE)
diff --git a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/testlib/x86/a.g/Makefile b/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/testlib/x86/a.g/Makefile
deleted file mode 100644
index 2c760893e32..00000000000
--- a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/testlib/x86/a.g/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-include ../../common.mk
diff --git a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/testlib/x86/a.g/libtestlib_g.a b/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/testlib/x86/a.g/libtestlib_g.a
deleted file mode 100644
index 06377b5ef2f..00000000000
--- a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/testlib/x86/a.g/libtestlib_g.a
+++ /dev/null
Binary files differ
diff --git a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/testlib/x86/a.g/test.o b/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/testlib/x86/a.g/test.o
deleted file mode 100644
index a12942b1527..00000000000
--- a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/testlib/x86/a.g/test.o
+++ /dev/null
Binary files differ
diff --git a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/testlib/x86/a.g/test2.o b/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/testlib/x86/a.g/test2.o
deleted file mode 100644
index 87e730cd7c5..00000000000
--- a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/testlib/x86/a.g/test2.o
+++ /dev/null
Binary files differ
diff --git a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/testlib/x86/so.g/Makefile b/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/testlib/x86/so.g/Makefile
deleted file mode 100644
index 2c760893e32..00000000000
--- a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/testlib/x86/so.g/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-include ../../common.mk
diff --git a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/testlib/x86/so.g/libtestlib_g.so b/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/testlib/x86/so.g/libtestlib_g.so
deleted file mode 100644
index c0e76f7695b..00000000000
--- a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/testlib/x86/so.g/libtestlib_g.so
+++ /dev/null
Binary files differ
diff --git a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/testlib/x86/so.g/libtestlib_gS.a b/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/testlib/x86/so.g/libtestlib_gS.a
deleted file mode 100644
index b03c33bdc91..00000000000
--- a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/testlib/x86/so.g/libtestlib_gS.a
+++ /dev/null
Binary files differ
diff --git a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/testlib/x86/so.g/test.o b/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/testlib/x86/so.g/test.o
deleted file mode 100644
index c9009cb22dc..00000000000
--- a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/testlib/x86/so.g/test.o
+++ /dev/null
Binary files differ
diff --git a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/testlib/x86/so.g/test2.o b/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/testlib/x86/so.g/test2.o
deleted file mode 100644
index a13bcd826b8..00000000000
--- a/core/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/resources/testlib/x86/so.g/test2.o
+++ /dev/null
Binary files differ

Back to the top