bgarrels / hamcrest

Automatically exported from code.google.com/p/hamcrest
0 stars 0 forks source link

Matchers.arrayContaining(Matcher...) does not work with primitive arrays #206

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The following fails to match:

        int[] primitiveArray = { 1, 2 };
        Matcher matcher = Matchers.arrayContaining(Matchers.equalTo(Integer.valueOf(1)),
                Matchers.equalTo(Integer.valueOf(2)));
        assertTrue(matcher.matches(primitiveArray));

The JavaDoc for arrayContaining(Matcher...) does not indicate this is not 
supported.  Either a bug in the docs, or a bug in the implementation.

Original issue reported on code.google.com by ryan.gus...@gmail.com on 18 Apr 2014 at 1:45