StructNlAttrTest: fix lint error
staticlibs/tests/unit/src/com/android/net/module/util/netlink/StructNlAttrTest.java:76: Warning: Use Integer.valueOf(TEST_ADDR_FLAGS) instead [UseValueOf]
assertEquals(integer1, new Integer(TEST_ADDR_FLAGS));
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
(also fix a typo in the test's name while at it)
Test: TreeHugger, atest NetworkStaticLibTests
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I494de68a6885339c66075b5bd10fc05e5c0896c1
This commit is contained in:
parent
904ae8f327
commit
d7b866df70
1 changed files with 2 additions and 2 deletions
|
|
@ -69,11 +69,11 @@ public class StructNlAttrTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testGetValueAsIntger() {
|
||||
public void testGetValueAsInteger() {
|
||||
final StructNlAttr attr1 = new StructNlAttr(IFA_FLAGS, TEST_ADDR_FLAGS);
|
||||
final Integer integer1 = attr1.getValueAsInteger();
|
||||
final int int1 = attr1.getValueAsInt(0x08 /* default value */);
|
||||
assertEquals(integer1, new Integer(TEST_ADDR_FLAGS));
|
||||
assertEquals(integer1, Integer.valueOf(TEST_ADDR_FLAGS));
|
||||
assertEquals(int1, TEST_ADDR_FLAGS);
|
||||
|
||||
// Malformed attribute.
|
||||
|
|
|
|||
Loading…
Reference in a new issue