1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

FIXED - bug 302963: Refactoring history is sensitive to line-endings

https://bugs.eclipse.org/bugs/show_bug.cgi?id=302963
This commit is contained in:
Emanuel Graf 2010-02-17 14:57:07 +00:00
parent ab580bbafe
commit 608c4287b4
3 changed files with 6 additions and 9 deletions

View file

@ -2,8 +2,7 @@
//#org.eclipse.cdt.ui.tests.refactoring.utils.TranslationUnitHelperTest
//@.config
filename=A.h
offset_unix=27
offset_win=30
offset=27
//@A.h
#ifndef A_H_
#define A_H_
@ -22,8 +21,7 @@ public:
//#org.eclipse.cdt.ui.tests.refactoring.utils.TranslationUnitHelperTest
//@.config
filename=A.h
offset_unix=0
offset_win=0
offset=0
//@A.h
typedef int nummere;

View file

@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik
* Copyright (c) 2008, 2010 Institute for Software, HSR Hochschule fuer Technik
* Rapperswil, University of applied sciences and others
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@ -26,7 +26,7 @@ public class TestSourceFile {
private String name;
private StringBuffer source = new StringBuffer();
private StringBuffer expectedSource = new StringBuffer();
private String separator = System.getProperty("line.separator"); //$NON-NLS-1$
private String separator = "\n"; //$NON-NLS-1$
private int selectionStart = -1;
private int selectionEnd = -1;

View file

@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik
* Copyright (c) 2008, 2010 Institute for Software, HSR Hochschule fuer Technik
* Rapperswil, University of applied sciences and others
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@ -45,7 +45,6 @@ public class TranslationUnitHelperTest extends RefactoringTest {
@Override
protected void configureRefactoring(Properties refactoringProperties) {
String offsetKind = (System.getProperty("line.separator").equals("\n")) ? "offset_unix" : "offset_win"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
offset = new Integer(refactoringProperties.getProperty(offsetKind, "0")).intValue(); //$NON-NLS-1$
offset = new Integer(refactoringProperties.getProperty("offset", "0")).intValue(); //$NON-NLS-1$
}
}