Skip to content
Permalink
Browse files

Test for addition.

  • Loading branch information...
renatoathaydes committed Nov 24, 2019
1 parent b547ecb commit b2484af3d49a0694f501925051c5cbb19e77b263
@@ -29,6 +29,12 @@ class ClassLevelJasminCodeTest {
assert instance.getI() == 42
}

@Test
void canAddIntegers() {
def instance = new JasminCodeClass( 'Spock', 42 )
assert instance.ints == 5
}

@Test
void canDeclareDefaultConstructor() {
def instance = new JasminCodeClassComplex()
@@ -57,4 +57,15 @@ class JasminCodeClass extends Object {
111 // ignored
}

int getInts() {
"""\
.limit stack 2
iconst_2
iconst_3
iadd
ireturn
"""
0 // ignored
}

}

0 comments on commit b2484af

Please sign in to comment.
You can’t perform that action at this time.