|
Groovy example source code file (BinaryIntOperationsTest.groovy)
The Groovy BinaryIntOperationsTest.groovy source codepackage org.codehaus.groovy.classgen.asm /** * @author Guillaume Laforge */ class BinaryIntOperationsTest extends AbstractBytecodeTestCase { void testIntPlus() { assert compile("""\ int i = 1 int j = 2 int k = i + j """).hasSequence([ "ILOAD", "ILOAD", "IADD" ]) } void testIntCompareLessThan() { assert compile("""\ int i = 0 if (i < 100) println "true" """).hasSequence([ "ILOAD", "LDC 100", "IF_ICMPGE" ]) } void testCompareLessThanInClosure() { // GROOVY-4741 assert """ int a = 0 [].each { if (a < 0) {} } true """ } } Other Groovy examples (source code examples)Here is a short list of links related to this Groovy BinaryIntOperationsTest.groovy source code file: |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.