Suppress a warning in a test

In general we insist that you assign the return of checkRegistrarConsoleLogin
to something, since it's annotated with @CheckReturnValue, but in this
specific test which should always throw the value is unused, so suppress the
"unused" warning.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=146265522
This commit is contained in:
cgoldfeder 2017-02-01 11:10:43 -08:00 committed by Ben McIlwain
parent 90a1f4a24e
commit c366c50d09

View file

@ -112,8 +112,10 @@ public class SessionUtilsTest {
} }
@Test @Test
public void testCheckRegistrarConsoleLogin_notLoggedIn_throwsIse() throws Exception { public void testCheckRegistrarConsoleLogin_notLoggedIn_throwsIllegalStateException()
throws Exception {
thrown.expect(IllegalStateException.class); thrown.expect(IllegalStateException.class);
@SuppressWarnings("unused")
boolean unused = sessionUtils.checkRegistrarConsoleLogin(req); boolean unused = sessionUtils.checkRegistrarConsoleLogin(req);
} }