From 3855933de121b8f1f9f0a54a2371a910bae1cfd4 Mon Sep 17 00:00:00 2001 From: Thomas Corbat Date: Thu, 9 Apr 2015 10:54:44 +0200 Subject: [PATCH] Bug 399217 - Toggle Function: Exception on typedef as return type The bug(s) seems to be fixed already. Added a test case for verification. Change-Id: If42d796ba27694254bdcd79d69aad323763c2105 Signed-off-by: Thomas Corbat --- .../togglefunction/ToggleRefactoringTest.java | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/togglefunction/ToggleRefactoringTest.java b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/togglefunction/ToggleRefactoringTest.java index 1445b7fbdca..443042aca5b 100644 --- a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/togglefunction/ToggleRefactoringTest.java +++ b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/togglefunction/ToggleRefactoringTest.java @@ -3216,4 +3216,51 @@ public class ToggleRefactoringTest extends RefactoringTestBase { public void testQualifiedFunctionInNestedNamespaceToSourceWithRecurringNamespaceName_464102() throws Exception { assertRefactoringSuccess(); } + + //A.h + //typedef unsigned long uL; + //uL f(); + //uL /*$*/f/*$$*/() { + // ulong a; + // return a; + //} + //==================== + //typedef unsigned long uL; + //uL f(); + + //A.c + //#include "A.h" + //==================== + //#include "A.h" + // + //uL f() { + // ulong a; + // return a; + //} + public void testToggleFunctionWithTypedefReturntypeToSource_399217() throws Exception { + assertRefactoringSuccess(); + } + + //A.h + //typedef unsigned long uL; + //uL f(); + //==================== + //typedef unsigned long uL; + //uL f() { + // ulong a; + // return a; + //} + + //A.c + //#include "A.h" + // + //uL /*$*/f/*$$*/() { + // ulong a; + // return a; + //} + //==================== + //#include "A.h" + public void testToggleFunctionWithTypedefReturntypeToHeader_399217() throws Exception { + assertRefactoringSuccess(); + } }