mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-08 10:16:03 +02:00
Bug 323561 - Test cases
This commit is contained in:
parent
164c2c3331
commit
e5a1e9060f
1 changed files with 47 additions and 1 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2006, 2008 Wind River Systems, Inc. and others.
|
* Copyright (c) 2006, 2010 Wind River Systems, Inc. and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -55,6 +55,7 @@ public class DoxygenCCommentAutoEditStrategyTest extends DefaultCCommentAutoEdit
|
||||||
return suite(DoxygenCCommentAutoEditStrategyTest.class);
|
return suite(DoxygenCCommentAutoEditStrategyTest.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
protected void setUp() throws Exception {
|
protected void setUp() throws Exception {
|
||||||
super.setUp();
|
super.setUp();
|
||||||
fCProject= CProjectHelper.createCCProject("test"+System.currentTimeMillis(), null);
|
fCProject= CProjectHelper.createCCProject("test"+System.currentTimeMillis(), null);
|
||||||
|
@ -63,6 +64,7 @@ public class DoxygenCCommentAutoEditStrategyTest extends DefaultCCommentAutoEdit
|
||||||
/*
|
/*
|
||||||
* @see junit.framework.TestCase#tearDown()
|
* @see junit.framework.TestCase#tearDown()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
protected void tearDown() throws Exception {
|
protected void tearDown() throws Exception {
|
||||||
CProjectHelper.delete(fCProject);
|
CProjectHelper.delete(fCProject);
|
||||||
super.tearDown();
|
super.tearDown();
|
||||||
|
@ -571,7 +573,50 @@ public class DoxygenCCommentAutoEditStrategyTest extends DefaultCCommentAutoEdit
|
||||||
public void testAutoDocCommentContent17_Dec() throws CoreException {
|
public void testAutoDocCommentContent17_Dec() throws CoreException {
|
||||||
assertAutoEditBehaviour();
|
assertAutoEditBehaviour();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// /**X
|
||||||
|
// extern "C" void foo(int x);
|
||||||
|
|
||||||
|
// /**
|
||||||
|
// * X
|
||||||
|
// * @param x
|
||||||
|
// */
|
||||||
|
// extern "C" void foo(int x);
|
||||||
|
public void testAutoDocCommentExternC1() throws CoreException {
|
||||||
|
assertAutoEditBehaviour();
|
||||||
|
}
|
||||||
|
|
||||||
|
// /**X
|
||||||
|
// extern "C" {
|
||||||
|
// void foo(int x);
|
||||||
|
// }
|
||||||
|
|
||||||
|
// /**
|
||||||
|
// * X
|
||||||
|
// */
|
||||||
|
// extern "C" {
|
||||||
|
// void foo(int x);
|
||||||
|
// }
|
||||||
|
public void testAutoDocCommentExternC2() throws CoreException {
|
||||||
|
assertAutoEditBehaviour();
|
||||||
|
}
|
||||||
|
|
||||||
|
// extern "C" {
|
||||||
|
// /**X
|
||||||
|
// void foo(int x);
|
||||||
|
// }
|
||||||
|
|
||||||
|
// extern "C" {
|
||||||
|
// /**
|
||||||
|
// * X
|
||||||
|
// * @param x
|
||||||
|
// */
|
||||||
|
// void foo(int x);
|
||||||
|
// }
|
||||||
|
public void testAutoDocCommentExternC3() throws CoreException {
|
||||||
|
assertAutoEditBehaviour();
|
||||||
|
}
|
||||||
|
|
||||||
protected void assertAutoEditBehaviour() throws CoreException {
|
protected void assertAutoEditBehaviour() throws CoreException {
|
||||||
CTextTools textTools = CUIPlugin.getDefault().getTextTools();
|
CTextTools textTools = CUIPlugin.getDefault().getTextTools();
|
||||||
final IDocument doc = new Document();
|
final IDocument doc = new Document();
|
||||||
|
@ -588,6 +633,7 @@ public class DoxygenCCommentAutoEditStrategyTest extends DefaultCCommentAutoEdit
|
||||||
|
|
||||||
|
|
||||||
DoxygenMultilineAutoEditStrategy ds= new DoxygenMultilineAutoEditStrategy() {
|
DoxygenMultilineAutoEditStrategy ds= new DoxygenMultilineAutoEditStrategy() {
|
||||||
|
@Override
|
||||||
public IASTTranslationUnit getAST() {
|
public IASTTranslationUnit getAST() {
|
||||||
final IFile file= fCProject.getProject().getFile("testContent.cpp");
|
final IFile file= fCProject.getProject().getFile("testContent.cpp");
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Add table
Reference in a new issue