Menu

IllegalStateException When Lists are Not Same Length

Users
2015-03-23
2015-03-25
  • Omega Projects

    Omega Projects - 2015-03-23

    For the following test, using Unitils 3.4.2, I get an
    IllegalStateException. When the lists are the same length, I do not. I also
    tried this with version 3.3, and it happened there as well. JDK 1.6.

    @Test
    public void test() {
    List<integer> list1 = Arrays.asList(1,2,3,4,5,6,7,8,9,0);
    List<integer> list2 = Arrays.asList(9,2,5,3,1,6,7,8,0,4,99);
    assertLenientEquals(list1, list2);
    }</integer></integer>

    --
    "Simplicity is the ultimate sophistication."
    -- Leonardo da Vinci

     
  • Tim Ducheyne

    Tim Ducheyne - 2015-03-25

    Hi Omega,

    this has already been fixed on trunk. As expected, the test gives now following assertion error:

    java.lang.AssertionError:
    Expected: [1, 2, 3, 4, 5, 6, 7, 8, 9, 0]
    Actual: [9, 2, 5, 3, 1, 6, 7, 8, 0, 4, 99]

    --- Found following differences ---
    Collections have a different size: Expected 10, actual 11.

    --- Difference detail tree ---
    expected: [1, 2, 3, 4, 5, 6, 7, 8, 9, 0]
    actual: [9, 2, 5, 3, 1, 6, 7, 8, 0, 4, 99]

    I'm restarting development on unitils-4.0
    The fix will be in there

    thanks for reporting the issue,
    grtz,
    Tim

     
    • Omega Projects

      Omega Projects - 2015-03-25

      Thanks for the update Tim!

      On a related note, the only way I was able to add a new subject to the user
      forum was by e-mail. The SF page lets you submit a new topic, and it acts
      like it posts, but it does not. I am not sure if this is an issue with SF
      or the configuration of the forum tool.

      On Wed, Mar 25, 2015 at 1:11 PM, Tim Ducheyne tim_ducheyne@users.sf.net
      wrote:

      Hi Omega,

      this has already been fixed on trunk. As expected, the test gives now
      following assertion error:

      java.lang.AssertionError:
      Expected: [1, 2, 3, 4, 5, 6, 7, 8, 9, 0]
      Actual: [9, 2, 5, 3, 1, 6, 7, 8, 0, 4, 99]

      --- Found following differences ---
      Collections have a different size: Expected 10, actual 11.

      --- Difference detail tree ---
      expected: [1, 2, 3, 4, 5, 6, 7, 8, 9, 0]
      actual: [9, 2, 5, 3, 1, 6, 7, 8, 0, 4, 99]

      I'm restarting development on unitils-4.0
      The fix will be in there

      thanks for reporting the issue,
      grtz,
      Tim


      IllegalStateException When Lists are Not Same Length
      https://sourceforge.net/p/unitils/discussion/570578/thread/ec784e13/?limit=25#c610


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/unitils/discussion/570578/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

      --
      "Simplicity is the ultimate sophistication."
      -- Leonardo da Vinci

       
  • Tim Ducheyne

    Tim Ducheyne - 2015-03-25

    I think it was because you were not logged in.
    I enabled anonymous posting. Should work now.

     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB