File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
liquidjava-verifier/src/test/java/liquidjava/rj_language Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change 1+ package liquidjava .integration ;
2+
3+ import static org .junit .Assert .assertEquals ;
4+
5+ import org .junit .Test ;
6+
7+ import liquidjava .rj_language .ast .BinaryExpression ;
8+ import liquidjava .rj_language .ast .LiteralInt ;
9+ import liquidjava .rj_language .opt .ConstantFolding ;
10+ import liquidjava .rj_language .opt .derivation_node .ValDerivationNode ;
11+
12+ public class TestIntegration {
13+ @ Test
14+ public void testConstantFoldingIntegration () {
15+ BinaryExpression expr = new BinaryExpression (new LiteralInt (3 ), "*" , new LiteralInt (4 ));
16+ ValDerivationNode result = ConstantFolding .fold (new ValDerivationNode (expr , null ));
17+ assertEquals (new LiteralInt (12 ), result .getValue ());
18+ }
19+ }
You can’t perform that action at this time.
0 commit comments