Skip to content

Commit 6b09a48

Browse files
kstangerKeith Stanger
authored and
Keith Stanger
committed
Removes forNumber test from public source since it's not available in the most recent public version of protocol buffers yet.
Change on 2016/02/09 by kstanger <[email protected]> ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=114227647
1 parent f248b82 commit 6b09a48

File tree

1 file changed

+9
-17
lines changed

1 file changed

+9
-17
lines changed

protobuf/tests/CompatibilityTest.java

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -530,23 +530,15 @@ public void testEnumGetNumber() throws Exception {
530530
assertEquals(9, TypicalData.EnumType.VALUE9.getNumber());
531531
}
532532

533-
public void testEnumValueOf() throws Exception {
534-
assertEquals(TypicalData.EnumType.VALUE1, TypicalData.EnumType.forNumber(1));
535-
assertEquals(TypicalData.EnumType.VALUE2, TypicalData.EnumType.forNumber(2));
536-
assertEquals(TypicalData.EnumType.VALUE3, TypicalData.EnumType.forNumber(3));
537-
assertEquals(TypicalData.EnumType.VALUE4, TypicalData.EnumType.forNumber(4));
538-
assertEquals(TypicalData.EnumType.VALUE9, TypicalData.EnumType.forNumber(9));
539-
assertNull(TypicalData.EnumType.forNumber(5));
540-
}
541-
542-
public void testEnumForNumber() throws Exception {
543-
assertEquals(TypicalData.EnumType.VALUE1, TypicalData.EnumType.forNumber(1));
544-
assertEquals(TypicalData.EnumType.VALUE2, TypicalData.EnumType.forNumber(2));
545-
assertEquals(TypicalData.EnumType.VALUE3, TypicalData.EnumType.forNumber(3));
546-
assertEquals(TypicalData.EnumType.VALUE4, TypicalData.EnumType.forNumber(4));
547-
assertEquals(TypicalData.EnumType.VALUE9, TypicalData.EnumType.forNumber(9));
548-
assertNull(TypicalData.EnumType.forNumber(5));
549-
}
533+
534+
public void testEnumValueOf() throws Exception {
535+
assertEquals(TypicalData.EnumType.VALUE1, TypicalData.EnumType.valueOf(1));
536+
assertEquals(TypicalData.EnumType.VALUE2, TypicalData.EnumType.valueOf(2));
537+
assertEquals(TypicalData.EnumType.VALUE3, TypicalData.EnumType.valueOf(3));
538+
assertEquals(TypicalData.EnumType.VALUE4, TypicalData.EnumType.valueOf(4));
539+
assertEquals(TypicalData.EnumType.VALUE9, TypicalData.EnumType.valueOf(9));
540+
assertNull(TypicalData.EnumType.valueOf(5));
541+
}
550542

551543
public void testEnumValueOfWithString() throws Exception {
552544
assertEquals(TypicalData.EnumType.VALUE1, TypicalData.EnumType.valueOf("VALUE1"));

0 commit comments

Comments
 (0)