Skip to content

Commit

Permalink
Suppress ErrorProne CheckReturnValue check for some tests
Browse files Browse the repository at this point in the history
These have been flagged by Google's ErrorProne linter.
  • Loading branch information
hoisie committed Dec 5, 2024
1 parent aab27b1 commit e8efda6
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ public void setup() {
mResources = InstrumentationRegistry.getInstrumentation().getTargetContext().getResources();
}

@SuppressWarnings("CheckReturnValue")
@Test
public void testConstructor() {
int[] color = new int[] {1, 2, 3};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
@RunWith(RobolectricTestRunner.class)
public class ShadowNativeHardwareRendererObserverTest {

@SuppressWarnings("CheckReturnValue")
@Test
public void test_hardwareRenderer() {
OnFrameMetricsAvailableListener listener = i -> {};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
@RunWith(RobolectricTestRunner.class)
public class ShadowNativeHardwareRendererTest {

@SuppressWarnings("CheckReturnValue")
@Test
public void test_hardwareRenderer() {
new HardwareRenderer();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
@RunWith(AndroidJUnit4.class)
@Config(minSdk = O)
public class ShadowNativeMaskFilterTest {
@SuppressWarnings("CheckReturnValue")
@Test
public void testConstructor() {
new MaskFilter();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
@Config(minSdk = O)
public class ShadowNativePathEffectTest {

@SuppressWarnings("CheckReturnValue")
@Test
public void testConstructor() {
new PathEffect();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ public void testConstructor() {
}

/** {@link #SKSL} does not compile on V and above. */
@SuppressWarnings("CheckReturnValue")
@Config(minSdk = TIRAMISU, maxSdk = U.SDK_INT)
@Test
public void testConstructorT() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
@RunWith(AndroidJUnit4.class)
@Config(minSdk = O)
public class ShadowNativeShaderTest {
@SuppressWarnings("CheckReturnValue")
@Test
public void testConstructor() {
new Shader();
Expand Down

0 comments on commit e8efda6

Please sign in to comment.