diff options
author | Julien HENRY <julien.henry@sonarsource.com> | 2018-09-17 16:59:39 +0200 |
---|---|---|
committer | SonarTech <sonartech@sonarsource.com> | 2018-09-24 20:20:57 +0200 |
commit | 1241f18a7b389336ce1eb98fe024f8db0bc5c627 (patch) | |
tree | c0f533c2afbff0b6271d0ee0575eda4e4834153a /plugins | |
parent | 3e5ce7c6fc3ccffc09ff6cb630b641c3ce101432 (diff) | |
download | sonarqube-1241f18a7b389336ce1eb98fe024f8db0bc5c627.tar.gz sonarqube-1241f18a7b389336ce1eb98fe024f8db0bc5c627.zip |
SONAR-11259 Improve source offset handling on Windows
* Trying to create a range in the middle of a \r\n sequence will now
automatically be adapted to exclude the eol
* Fix a few other tests on Windows
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/rule/AnalysisErrorSensorTest.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/rule/AnalysisErrorSensorTest.java b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/rule/AnalysisErrorSensorTest.java index 396538ffee5..4eb1855c8c3 100644 --- a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/rule/AnalysisErrorSensorTest.java +++ b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/rule/AnalysisErrorSensorTest.java @@ -65,10 +65,12 @@ public class AnalysisErrorSensorTest { Path baseDir = temp.newFolder().toPath().toAbsolutePath(); createErrorFile(baseDir); - int[] offsets = {10, 20, 30, 40}; + int[] startOffsets = {10, 20, 30, 40}; + int[] endOffsets = {19, 29, 39, 49}; DefaultInputFile inputFile = new TestInputFileBuilder("foo", "src/foo.xoo") .setLanguage("xoo") - .setOriginalLineOffsets(offsets) + .setOriginalLineStartOffsets(startOffsets) + .setOriginalLineEndOffsets(endOffsets) .setModuleBaseDir(baseDir) .setLines(4) .build(); |