Stricter whitespace handling
This commit is contained in:
parent
227596eb90
commit
6f6d99b3e3
3 changed files with 15 additions and 8 deletions
|
@ -3,6 +3,7 @@ root = true
|
||||||
[*]
|
[*]
|
||||||
end_of_line = lf
|
end_of_line = lf
|
||||||
insert_final_newline = true
|
insert_final_newline = true
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
|
||||||
[*.java]
|
[*.java]
|
||||||
indent_style = space
|
indent_style = space
|
||||||
|
|
|
@ -11,7 +11,6 @@ import org.junit.AfterClass;
|
||||||
import org.junit.BeforeClass;
|
import org.junit.BeforeClass;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
import btools.router.OsmNogoPolygon.Point;
|
|
||||||
import btools.util.CheapRuler;
|
import btools.util.CheapRuler;
|
||||||
|
|
||||||
public class OsmNogoPolygonTest {
|
public class OsmNogoPolygonTest {
|
||||||
|
@ -77,9 +76,9 @@ public class OsmNogoPolygonTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testIsWithin() {
|
public void testIsWithin() {
|
||||||
double[] plons = {0.0, 0.5, 1.0, -1.5, -0.5, 1.0, 1.0, 0.5, 0.5, 0.5,};
|
double[] plons = {0.0, 0.5, 1.0, -1.5, -0.5, 1.0, 1.0, 0.5, 0.5, 0.5};
|
||||||
double[] plats = {0.0, 1.5, 0.0, 0.5, -1.5, -1.0, -0.1, -0.1, 0.0, 0.1,};
|
double[] plats = {0.0, 1.5, 0.0, 0.5, -1.5, -1.0, -0.1, -0.1, 0.0, 0.1};
|
||||||
boolean[] within = {true, false, false, false, false, true, true, true, true, true,};
|
boolean[] within = {true, false, false, false, false, true, true, true, true, true};
|
||||||
|
|
||||||
for (int i = 0; i < plons.length; i++) {
|
for (int i = 0; i < plons.length; i++) {
|
||||||
assertEquals("(" + plons[i] + "," + plats[i] + ")", within[i], polygon.isWithin(toOsmLon(plons[i], OFFSET_X), toOsmLat(plats[i], OFFSET_Y)));
|
assertEquals("(" + plons[i] + "," + plats[i] + ")", within[i], polygon.isWithin(toOsmLon(plons[i], OFFSET_X), toOsmLat(plats[i], OFFSET_Y)));
|
||||||
|
|
|
@ -17,5 +17,12 @@
|
||||||
<property name="throwsIndent" value="2" />
|
<property name="throwsIndent" value="2" />
|
||||||
<property name="lineWrappingIndentation" value="2" />
|
<property name="lineWrappingIndentation" value="2" />
|
||||||
</module>
|
</module>
|
||||||
|
|
||||||
|
<module name="ParenPad" />
|
||||||
|
<module name="NoWhitespaceBefore">
|
||||||
|
<property name="allowLineBreaks" value="true" />
|
||||||
|
</module>
|
||||||
|
<module name="WhitespaceAfter" />
|
||||||
|
|
||||||
</module>
|
</module>
|
||||||
</module>
|
</module>
|
||||||
|
|
Loading…
Reference in a new issue