Uploaded image for project: 'Commons CLI'
  1. Commons CLI
  2. CLI-50

[cli] TestHelpFormatter.testAutomaticUsage unit test failure

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Nightly Builds
    • 2.0
    • CLI-2.x
    • None
    • Operating System: Windows XP
      Platform: PC

    • 18831

    Description

      I am seing the following error:

      junit.framework.ComparisonFailure: simple auto usage expected:<...b] [-a...>
      but was:<...a] [-b...>
      at junit.framework.Assert.assertEquals(Assert.java:81)
      at org.apache.commons.cli.TestHelpFormatter.testAutomaticUsage
      (TestHelpFormatter.java:168)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke
      (NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke
      (DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at junit.framework.TestCase.runTest(TestCase.java:154)
      at junit.framework.TestCase.runBare(TestCase.java:127)
      at junit.framework.TestResult$1.protect(TestResult.java:106)
      at junit.framework.TestResult.runProtected(TestResult.java:124)
      at junit.framework.TestResult.run(TestResult.java:109)
      at junit.framework.TestCase.run(TestCase.java:118)
      at junit.framework.TestSuite.runTest(TestSuite.java:208)
      at junit.framework.TestSuite.run(TestSuite.java:203)
      at junit.framework.TestSuite.runTest(TestSuite.java:208)
      at junit.framework.TestSuite.run(TestSuite.java:203)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests
      (RemoteTestRunner.java:392)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run
      (RemoteTestRunner.java:276)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main
      (RemoteTestRunner.java:167)

      Since HashMaps are used in the Options class the order or Option instances
      cannot be guaranteed.

      FYI, I am running the tests from Eclipse 2.1 on top of Java 1.4.1_02. Will the
      current pending "v2" changes from John K will solve this?

      Attachments

        Activity

          People

            Unassigned Unassigned
            ggregory Gary D. Gregory
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: