Skip to content

Commit

Permalink
suppress RobolectricSystemContext violations
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 382337882
  • Loading branch information
Googler authored and hoisie committed Jul 2, 2021
1 parent bef2afb commit a095a5b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
Expand Up @@ -65,6 +65,7 @@ public void shouldAssignThePackageNameFromTheManifest() {
}

@Test
@SuppressWarnings("RobolectricSystemContext") // preexisting when check was enabled
public void shouldRegisterReceiversFromTheManifest() throws Exception {
// gross:
shadowOf((Application) ApplicationProvider.getApplicationContext()).clearRegisteredReceivers();
Expand Down
Expand Up @@ -78,6 +78,7 @@

/** Test of ShadowActivity. */
@RunWith(AndroidJUnit4.class)
@SuppressWarnings("RobolectricSystemContext") // preexisting when check was enabled
public class ShadowActivityTest {
private Activity activity;

Expand Down
Expand Up @@ -885,6 +885,7 @@ public void getProvider_shouldCreateProviderFromManifest() throws Exception {

@Test
@Config(manifest = NONE)
@SuppressWarnings("RobolectricSystemContext") // preexisting when check was enabled
public void getProvider_shouldNotReturnAnyProviderWhenManifestIsNull() {
Application application = new Application();
shadowOf(application).callAttach(RuntimeEnvironment.systemContext);
Expand Down

0 comments on commit a095a5b

Please sign in to comment.