From fe6b056773632135366ace74a1630afb6c5a48fa Mon Sep 17 00:00:00 2001 From: Emanuel Graf Date: Thu, 1 Jul 2010 06:46:39 +0000 Subject: [PATCH] Bug 318493: ExtractLocalVariableRefactoringTest float fails because of error in test https://bugs.eclipse.org/bugs/show_bug.cgi?id=318493 --- .../refactoring/ExtractLocalVariable.rts | 65 ++++++++++++++++++- 1 file changed, 64 insertions(+), 1 deletion(-) diff --git a/core/org.eclipse.cdt.ui.tests/resources/refactoring/ExtractLocalVariable.rts b/core/org.eclipse.cdt.ui.tests/resources/refactoring/ExtractLocalVariable.rts index 428ff875e62..465dd1206d0 100644 --- a/core/org.eclipse.cdt.ui.tests/resources/refactoring/ExtractLocalVariable.rts +++ b/core/org.eclipse.cdt.ui.tests/resources/refactoring/ExtractLocalVariable.rts @@ -165,6 +165,69 @@ A::~A() { } +float A::foo() +{ + return /*$*/42.0f/*$$*/; +} + +//= +#include "A.h" + +A::A() +{ +} + +A::~A() +{ +} + +float A::foo() +{ + float f = 42.0f; + return f; +} + +//!ExtractLocalVariableRefactoringTest double +//#org.eclipse.cdt.ui.tests.refactoring.extractlocalvariable.ExtractLocalVariableRefactoringTest +//@A.h +#ifndef A_H_ +#define A_H_ + +class A +{ +public: + A(); + virtual ~A(); + float foo(); +}; + +#endif /*A_H_*/ + +//= +#ifndef A_H_ +#define A_H_ + +class A +{ +public: + A(); + virtual ~A(); + float foo(); +}; + +#endif /*A_H_*/ + +//@A.cpp +#include "A.h" + +A::A() +{ +} + +A::~A() +{ +} + float A::foo() { return /*$*/42.0/*$$*/; @@ -183,7 +246,7 @@ A::~A() float A::foo() { - float f = 42.0; + double f = 42.0; return f; }