Changeset 16608 in josm for trunk/test


Ignore:
Timestamp:
2020-06-11T20:53:08+02:00 (4 years ago)
Author:
simon04
Message:

see #16567 - Fix OptionParserTest.testMultipleShort

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/tools/OptionParserTest.java

    r14640 r16608  
    322322    @Test
    323323    public void testMultipleShort() {
    324         thrown.expect(OptionParseException.class);
    325         thrown.expectMessage("test: unrecognized option '-ft'");
    326324        AtomicReference<String> argFound = new AtomicReference<>();
    327325        AtomicBoolean usedFlag = new AtomicBoolean();
     
    335333                .addFlagParameter("fleg", () -> unusedFlag.set(true));
    336334
    337         List<String> remaining = parser.parseOptions(Arrays.asList("-ft=arg", "x"));
    338 
    339         assertEquals(Arrays.asList("x"), remaining);
    340         assertEquals("arg", argFound.get());
    341         assertTrue(usedFlag.get());
    342         assertFalse(unusedFlag.get());
    343 
    344         remaining = parser.parseOptions(Arrays.asList("-ft", "arg", "x"));
     335        List<String> remaining = parser.parseOptions(Arrays.asList("-ft", "arg", "x"));
    345336
    346337        assertEquals(Arrays.asList("x"), remaining);
Note: See TracChangeset for help on using the changeset viewer.