New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Content of multi-dimensional arrays is not rendered in comparison #958

Open
leonard84 opened this Issue Nov 28, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@leonard84
Member

leonard84 commented Nov 28, 2018

  def "single arrays are rendered correctly"() {
    expect:
    isRendered """
x == y
| |  |
| |  [1, 5]
| false
[2, 5]
    """, {
      int [] x =  [2,5]
      int [] y =  [1,5]
      assert x == y
    }
  }

  def "multi arrays are rendered correctly"() {
    expect:
    isRendered """
x == y
| |  |
| |  [[1,2], [1,5]]
| false
[[1,2], [2,5]]
    """, {
      int [][] x = [[1,2], [2,5]]
      int [][] y = [[1,2], [1,5]]
      assert x == y
    }
  }

The second test fails with a rendering of

x == y
| |  |
| |  [<[I@1e802ef9>, <[I@2b6faea6>]
| false
[<[I@4313f5bc>, <[I@7f010382>]

If nested lists, are used instead of an array it works as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment