Modify ↓
Opened 7 minutes ago
Last modified 5 minutes ago
#25010 new enhancement
Improve unit tests
| Reported by: | gaben | Owned by: | team |
|---|---|---|---|
| Priority: | normal | Milestone: | 26.12 |
| Component: | Unit tests | Version: | |
| Keywords: | Cc: |
Description (last modified by )
This is also a task that I have wanted to do for a long time.
There are no functional changes; it's just a case of fixing the existing ones. The changes include:
- Correct argument order so that the correct message appears when the test errors out. For example, see https://github.com/JOSM/josm/blob/bdc651ba9185db66d751a9f81922a2a89ac486dc/test/unit/org/openstreetmap/josm/gui/layer/GpxLayerTest.java#L97
- Use better asserts. For example, see https://github.com/JOSM/josm/blob/bdc651ba9185db66d751a9f81922a2a89ac486dc/test/unit/org/openstreetmap/josm/actions/mapmode/ParallelWaysTest.java#L94
- Fix obvious typos. For example, see https://github.com/JOSM/josm/blob/bdc651ba9185db66d751a9f81922a2a89ac486dc/test/unit/org/openstreetmap/josm/data/validation/tests/CrossingWaysTest.java#L177
- Fix duplicates. For example, see https://github.com/JOSM/josm/blob/bdc651ba9185db66d751a9f81922a2a89ac486dc/test/unit/org/openstreetmap/josm/data/coor/conversion/LatLonParserTest.java#L35-L36
The first group is a JUnit 4 legacy; see https://docs.junit.org/6.1.3/migrating-from-junit4.html#failure-message-arguments.
I already have a patch, the examples are just teasers :)
Attachments (0)
Note:
See TracTickets
for help on using tickets.


