Closed npasserini closed 7 years ago
Hi! Should I add a test to ensure that it works?
I have this test red. I made pull from dev after hackaton and now too (june 9 2017)
@Test
def void exponentiationPrecedence() {
'''
assert.equals(24, 3 * 2 ** 3)
assert.equals(36, 4.0 * 3 ** 2)
assert.equals(5, 1 + 2 ** 2)
'''.test
}
org.uqbar.project.wollok.tests.interpreter.WollokComparisonFailure: Expected [24] but found [216] at wollok.lib.assert.equals(expected,actual).(classpath:/wollok/lib.wlk:88) at .(__synthetic0.wpgm:2)
The problem was solved regenerating xtext artifacts from wollok.xtext file
If you evaluate
you will get 144 (=12^2) instead of 36(=4*9) as it should.