Skip to content

Commit

Permalink
Add an @Ignored unit test for a JUnitIncompatibleType CCE
Browse files Browse the repository at this point in the history
#4291

PiperOrigin-RevId: 609002759
  • Loading branch information
cushon authored and Error Prone Team committed Feb 21, 2024
1 parent 1eda7f8 commit 2afe510
Showing 1 changed file with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
package com.google.errorprone.bugpatterns.collectionincompatibletype;

import com.google.errorprone.CompilationTestHelper;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
Expand Down Expand Up @@ -98,4 +99,19 @@ public void assertArrayEquals_primitiveOverloadsFine() {
"}")
.doTest();
}

@Ignore("https://github.com/google/error-prone/issues/4291")
@Test
public void assertArrayEquals_cast() {
compilationHelper
.addSourceLines(
"Test.java",
"import static org.junit.Assert.assertArrayEquals;",
"final class Test {",
" public void test(Object o, byte[] b) {",
" assertArrayEquals((byte[]) o, b);",
" }",
"}")
.doTest();
}
}

0 comments on commit 2afe510

Please sign in to comment.