diff options
Diffstat (limited to 'tests/src/cgeo/geocaching/geopoint/ViewportTest.java')
| -rw-r--r-- | tests/src/cgeo/geocaching/geopoint/ViewportTest.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/src/cgeo/geocaching/geopoint/ViewportTest.java b/tests/src/cgeo/geocaching/geopoint/ViewportTest.java index ab59e79..ace0356 100644 --- a/tests/src/cgeo/geocaching/geopoint/ViewportTest.java +++ b/tests/src/cgeo/geocaching/geopoint/ViewportTest.java @@ -6,6 +6,7 @@ import cgeo.geocaching.ICoordinates; import org.eclipse.jdt.annotation.NonNull; +import android.annotation.SuppressLint; import android.test.AndroidTestCase; import java.util.Collections; @@ -59,6 +60,7 @@ public class ViewportTest extends AndroidTestCase { assertThat(vpRef.contains(new Geopoint(3.0, 4.0))).isTrue(); } + @SuppressLint("DefaultLocale") public static void testSqlWhere() { assertThat(vpRef.sqlWhere(null).toString()).isEqualTo("latitude >= -1.0 and latitude <= 3.0 and longitude >= -2.0 and longitude <= 4.0"); assertThat(vpRef.sqlWhere("t").toString()).isEqualTo("t.latitude >= -1.0 and t.latitude <= 3.0 and t.longitude >= -2.0 and t.longitude <= 4.0"); @@ -66,7 +68,7 @@ public class ViewportTest extends AndroidTestCase { try { current = Locale.getDefault(); Locale.setDefault(Locale.FRENCH); - assertEquals("1,0", String.format("%.2g", 1.0d)); // Control that we are in a locale with commma separator + assertThat(String.format("%.2g", 1.0d)).isEqualTo("1,0"); // Control that we are in a locale with comma separator assertThat(vpRef.sqlWhere("t").toString()).isEqualTo("t.latitude >= -1.0 and t.latitude <= 3.0 and t.longitude >= -2.0 and t.longitude <= 4.0"); } finally { Locale.setDefault(current); |
