Commit 2c623ffa authored by Eric Bruneton's avatar Eric Bruneton

Merge branch '316347-non-regression-test' into 'master'

Add a non-regression test for issue #316347.

See merge request !129
parents 648c512e a1dc33bc
Pipeline #841 passed with stage
in 5 minutes and 55 seconds
......@@ -29,6 +29,7 @@ package org.objectweb.asm.commons;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.objectweb.asm.commons.GeneratorAdapter.GE;
import static org.objectweb.asm.commons.GeneratorAdapter.LE;
import java.util.stream.Collectors;
......@@ -51,6 +52,10 @@ public class GeneratorAdapterTest {
public void testIfCmp() {
assertEquals("IF_ICMPGE L0", new Generator().ifCmp(Type.INT_TYPE, GE, new Label()));
assertEquals("LCMP IFGE L0", new Generator().ifCmp(Type.LONG_TYPE, GE, new Label()));
assertEquals("FCMPL IFGE L0", new Generator().ifCmp(Type.FLOAT_TYPE, GE, new Label()));
assertEquals("FCMPG IFLE L0", new Generator().ifCmp(Type.FLOAT_TYPE, LE, new Label()));
assertEquals("DCMPL IFGE L0", new Generator().ifCmp(Type.DOUBLE_TYPE, GE, new Label()));
assertEquals("DCMPG IFLE L0", new Generator().ifCmp(Type.DOUBLE_TYPE, LE, new Label()));
}
private static class Generator {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment