Changeset 12421 in josm for trunk/test/unit/org


Ignore:
Timestamp:
2017-06-22T00:29:46+02:00 (7 years ago)
Author:
Don-vip
Message:

see #14924 - improve NMEA documentation thanks to gpsd (http://www.catb.org/gpsd/NMEA.html) + add support for NMEA sentences coming from GLONASS, Galileo or Beidu receivers

Location:
trunk/test/unit/org/openstreetmap/josm/io/nmea
Files:
1 added
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/io/nmea/NmeaReaderTest.java

    r12418 r12421  
    11// License: GPL. For details, see LICENSE file.
    2 package org.openstreetmap.josm.io;
     2package org.openstreetmap.josm.io.nmea;
    33
    44import static org.junit.Assert.assertEquals;
     5import static org.junit.Assert.assertFalse;
     6import static org.junit.Assert.assertTrue;
    57
    68import java.io.FileInputStream;
     
    2022import org.openstreetmap.josm.data.gpx.GpxTrackSegment;
    2123import org.openstreetmap.josm.data.gpx.WayPoint;
     24import org.openstreetmap.josm.io.GpxReaderTest;
    2225import org.openstreetmap.josm.testutils.JOSMTestRules;
    2326import org.openstreetmap.josm.tools.date.DateUtils;
     
    9295
    9396    /**
     97     * Unit test of {@link NmeaReader#isSentence}.
     98     */
     99    @Test
     100    public void testIsSentence() {
     101        assertTrue(NmeaReader.isSentence("$GPVTG", Sentence.VTG));
     102        assertTrue(NmeaReader.isSentence("$GAVTG", Sentence.VTG));
     103        assertTrue(NmeaReader.isSentence("$GNVTG", Sentence.VTG));
     104        assertFalse(NmeaReader.isSentence("XGAVTG", Sentence.VTG));
     105        assertFalse(NmeaReader.isSentence("$GPXXX", Sentence.VTG));
     106        assertFalse(NmeaReader.isSentence("$XXVTG", Sentence.VTG));
     107    }
     108
     109    /**
    94110     * Non-regression test for <a href="https://josm.openstreetmap.de/ticket/1433">Bug #1433</a>.
    95111     * @throws Exception if an error occurs
Note: See TracChangeset for help on using the changeset viewer.