blob: 939843abffedd9cc0803cca9d2cf40e6092707f3 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
/*******************************************************************************
* Copyright (c) 2002, 2006 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Rational Software - Initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.core.model.failedTests;
import java.io.FileInputStream;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
import org.eclipse.cdt.core.dom.IPDOMManager;
import org.eclipse.cdt.core.model.ICProject;
import org.eclipse.cdt.core.testplugin.CProjectHelper;
import org.eclipse.cdt.core.testplugin.CTestPlugin;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Path;
/**
* @author vhirsl
*
* To change the template for this generated type comment go to
* Window>Preferences>Java>Code Generation>Code and Comments
*/
public class CModelElementsFailedTests extends TestCase {
private ICProject fCProject;
private IFile headerFile;
private NullProgressMonitor monitor;
public static Test suite() {
TestSuite suite= new TestSuite(CModelElementsFailedTests.class.getName());
suite.addTest(new CModelElementsFailedTests("testBug36379"));
return suite;
}
public CModelElementsFailedTests(String name) {
super(name);
}
protected void setUp() throws Exception {
monitor = new NullProgressMonitor();
String pluginRoot = CTestPlugin.getDefault().find(new Path("/")).getFile();
fCProject= CProjectHelper.createCCProject("TestProject1", "bin", IPDOMManager.ID_NO_INDEXER);
headerFile = fCProject.getProject().getFile("CModelElementsTest.h");
if (!headerFile.exists()) {
try{
FileInputStream fileIn = new FileInputStream(pluginRoot+ "resources/cfiles/CModelElementsTestStart.h");
headerFile.create(fileIn,false, monitor);
} catch (CoreException e) {
e.printStackTrace();
}
}
}
protected void tearDown() {
CProjectHelper.delete(fCProject);
}
}
|