Skip to content

Commit 3502839

Browse files
committed
Enable test for #1203
1 parent b2e382a commit 3502839

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed
Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
11
package com.fasterxml.jackson.core.sym;
22

3-
import org.junit.Ignore;
4-
import org.junit.Test;
3+
import org.junit.jupiter.api.Test;
54

6-
import static org.junit.Assert.assertEquals;
5+
import static org.junit.Assert.fail;
76

8-
public class ByteQuadsCanonicalizerTest {
7+
public class ByteQuadsCanonicalizerTest
8+
{
99
@Test
10-
@Ignore
11-
public void testMultiplyByFourFifths() {
12-
for (long i = 0; i <= Integer.MAX_VALUE; i++) {
13-
int number = (int) i;
14-
int expected = (int) (number * 0.80);
15-
int actual = ByteQuadsCanonicalizer.multiplyByFourFifths(number);
16-
assertEquals("input=" + number, expected, actual);
10+
public void testMultiplyByFourFifths()
11+
{
12+
int i = 0;
13+
for (; i >= 0; i += 7) {
14+
int expected = (int) (i * 0.80);
15+
int actual = ByteQuadsCanonicalizer.multiplyByFourFifths(i);
16+
if (expected != actual) {
17+
fail("Input for 80% of "+i+" differs: expected="+expected+", actual="+actual);
18+
}
1719
}
1820
}
1921
}

0 commit comments

Comments
 (0)