208: @Test public void testIncrement_existingKey() { 209: assertEquals(9, tally.get("key1")); 210: }
1: private final Tally tally = new Tally(); 2: @Before public void setUp() { 3: tally.increment("key1", 8); 4: tally.increment("key2", 100); 5: tally.increment("key1", 0); 6: tally.increment("key1", 1); 7: } // 200 lines away 208: @Test public void testIncrement_existingKey() { 209: assertEquals(9, tally.get("key1")); 210: }
1: private final Tally tally = new Tally(); 2: @Test public void testIncrement_newKey() { 3: tally.increment("key", 100); 5: assertEquals(100, tally.get("key")); 6: } 7: @Test public void testIncrement_existingKey() { 8: tally.increment("key", 8); 9: tally.increment("key", 1); 10: assertEquals(9, tally.get("key")); 11: } 12: @Test public void testIncrement_incrementByZeroDoesNothing() { 13: tally.increment("key", 8); 14: tally.increment("key", 0); 15: assertEquals(8, tally.get("key")); 16: }
ERROR: AddressSanitizer: heap-buffer-overflow on address 0x615000000ffa READ of size 2 at 0x615000000ffa thread T0 SCARINESS: 24 (2-byte-read-heap-buffer-overflow-far-from-bounds) #0 0x885e06 in tt_face_vary_cvtsrc/truetype/ttgxvar.c:1556:31