fix(examples): Fix test according to bug [fixes LNG-193] (#85)

This commit is contained in:
InversionSpaces 2023-06-13 13:34:21 +02:00 committed by GitHub
parent c3479a09b9
commit 0db0b66062
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -11,5 +11,6 @@ func lng193Bug(peer: string, closurePeer: string) -> u16:
c = getClosure(42, closurePeer) c = getClosure(42, closurePeer)
b = c b = c
a = b a = b
res = a(1) + b(2) + c(3) res1 = a(1) + a(2) -- Call two times for
<- res res2 = b(3) + b(4) -- bug to appear
<- res1 + res2

View File

@ -530,7 +530,7 @@ describe('Testing examples', () => {
it('closureReturnRename.aqua bug LNG-193', async () => { it('closureReturnRename.aqua bug LNG-193', async () => {
let result = await lng193BugCall(); let result = await lng193BugCall();
expect(result).toEqual(1 + 42 + 2 + 42 + 3 + 42) expect(result).toEqual((1 + 42) + (2 + 42) + (3 + 42) + (4 + 42))
}, 20000) }, 20000)
it('closures.aqua', async () => { it('closures.aqua', async () => {