Skip to content

Commit

Permalink
update test cases with TODO
Browse files Browse the repository at this point in the history
  • Loading branch information
armughan11 committed Oct 22, 2023
1 parent 0389903 commit ac5598b
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import com.google.errorprone.CompilationTestHelper;
import java.util.Arrays;
import org.junit.Ignore;
import org.junit.Test;

public class NullAwayJSpecifyArrayTests extends NullAwayTestsBase {
Expand Down Expand Up @@ -41,7 +40,6 @@ public void arrayDimensionAnnotationAssignment() {
.doTest();
}

@Ignore("Array type annotations aren't supported currently.")
@Test
public void arrayTypeAnnotationDereference() {
makeHelper()
Expand All @@ -52,14 +50,13 @@ public void arrayTypeAnnotationDereference() {
"class Test {",
" static @Nullable String [] fizz = {\"1\"};",
" static void foo() {",
" // BUG: Diagnostic contains: dereferenced expression fizz[0] is @Nullable.",
" // TODO: This should report an error due to dereference of @Nullable fizz[0]",
" int bar = fizz[0].length();",
" }",
"}")
.doTest();
}

@Ignore("Array type annotations aren't supported currently.")
@Test
public void arrayTypeAnnotationAssignment() {
makeHelper()
Expand All @@ -71,7 +68,7 @@ public void arrayTypeAnnotationAssignment() {
" Object fizz = new Object();",
" Object bar = new Object();",
" void m( @Nullable Integer [] foo) {",
" // BUG: Diagnostic contains: assigning @Nullable expression to @NonNull field",
" // TODO: This should report an error due to assignment of @Nullable fizz[0] to @NonNull field",
" fizz = foo[0];",
" // OK: valid assignment since only elements can be null",
" bar = foo;",
Expand Down

0 comments on commit ac5598b

Please sign in to comment.