mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-08 18:26:01 +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
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -55,6 +55,7 @@ public class DoxygenCCommentAutoEditStrategyTest extends DefaultCCommentAutoEdit
|
|||
return suite(DoxygenCCommentAutoEditStrategyTest.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
fCProject= CProjectHelper.createCCProject("test"+System.currentTimeMillis(), null);
|
||||
|
@ -63,6 +64,7 @@ public class DoxygenCCommentAutoEditStrategyTest extends DefaultCCommentAutoEdit
|
|||
/*
|
||||
* @see junit.framework.TestCase#tearDown()
|
||||
*/
|
||||
@Override
|
||||
protected void tearDown() throws Exception {
|
||||
CProjectHelper.delete(fCProject);
|
||||
super.tearDown();
|
||||
|
@ -572,6 +574,49 @@ public class DoxygenCCommentAutoEditStrategyTest extends DefaultCCommentAutoEdit
|
|||
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 {
|
||||
CTextTools textTools = CUIPlugin.getDefault().getTextTools();
|
||||
final IDocument doc = new Document();
|
||||
|
@ -588,6 +633,7 @@ public class DoxygenCCommentAutoEditStrategyTest extends DefaultCCommentAutoEdit
|
|||
|
||||
|
||||
DoxygenMultilineAutoEditStrategy ds= new DoxygenMultilineAutoEditStrategy() {
|
||||
@Override
|
||||
public IASTTranslationUnit getAST() {
|
||||
final IFile file= fCProject.getProject().getFile("testContent.cpp");
|
||||
try {
|
||||
|
|
Loading…
Add table
Reference in a new issue