From e5a1e9060fd29f8650901921be7924e7c58920d3 Mon Sep 17 00:00:00 2001 From: Anton Leherbauer Date: Thu, 16 Sep 2010 15:06:24 +0000 Subject: [PATCH] Bug 323561 - Test cases --- .../DoxygenCCommentAutoEditStrategyTest.java | 48 ++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-) diff --git a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/doctools/doxygen/DoxygenCCommentAutoEditStrategyTest.java b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/doctools/doxygen/DoxygenCCommentAutoEditStrategyTest.java index b2f1ee6cde9..d23b918e6c4 100644 --- a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/doctools/doxygen/DoxygenCCommentAutoEditStrategyTest.java +++ b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/doctools/doxygen/DoxygenCCommentAutoEditStrategyTest.java @@ -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(); @@ -571,7 +573,50 @@ public class DoxygenCCommentAutoEditStrategyTest extends DefaultCCommentAutoEdit public void testAutoDocCommentContent17_Dec() throws CoreException { 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 {