source: josm/trunk/test/unit/org/openstreetmap/josm/data/projection/proj/AbstractProjTest.java@ 18353

Last change on this file since 18353 was 18353, checked in by Don-vip, 2 years ago

fix #21696 - add robustness in case NaN coordinates are being projected (just log a warning)

File size: 1.0 KB
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.data.projection.proj;
3
4import static org.junit.jupiter.api.Assertions.assertTrue;
5
6import org.junit.jupiter.api.Test;
7import org.openstreetmap.josm.data.Bounds;
8
9/**
10 * Unit tests of {@link AbstractProj}
11 */
12class AbstractProjTest {
13
14 private final AbstractProj proj = new AbstractProj() {
15
16 @Override
17 public String getName() {
18 return null;
19 }
20
21 @Override
22 public String getProj4Id() {
23 return null;
24 }
25
26 @Override
27 public double[] project(double latRad, double lonRad) {
28 return null;
29 }
30
31 @Override
32 public double[] invproject(double east, double north) {
33 return null;
34 }
35
36 @Override
37 public Bounds getAlgorithmBounds() {
38 return null;
39 }};
40
41 @Test
42 void testCphi2NaN() {
43 assertTrue(Double.isNaN(proj.cphi2(Double.NaN)));
44 }
45}
Note: See TracBrowser for help on using the repository browser.