Skip to content

Commit

Permalink
Agrega nuevo caso de prueba m(p)
Browse files Browse the repository at this point in the history
  • Loading branch information
npasserini committed Oct 10, 2024
1 parent 6ece703 commit ab5a9a7
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions test/parser.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2662,7 +2662,7 @@ class c {}`
})

it('should recover from malformed message send without arguments', () => {
`m()`.should.be.parsedBy(parse.Expression) // TODO: No entiendo por qué acá funciona con Expression y no con Send.
`m()`.should.be.parsedBy(parser)
.recoveringFrom(parse.MALFORMED_MESSAGE_SEND, 0, 1)
.into(new Send({
receiver: new Literal({ value: null }),
Expand All @@ -2671,8 +2671,18 @@ class c {}`
}))
})

it('should recover from malformed message send with one argument', () => {
`m(p)`.should.be.parsedBy(parser)
.recoveringFrom(parse.MALFORMED_MESSAGE_SEND, 0, 1)
.into(new Send({
receiver: new Literal({ value: null }),
message: 'm',
args: [ new Reference({ name: 'p' }) ],
}))
})

it('should recover from malformed message send with multiple arguments', () => {
'm(p,q)'.should.be.parsedBy(parse.Expression) // TODO: No entiendo por qué acá funciona con Expression y no con Send.
'm(p,q)'.should.be.parsedBy(parser)
.recoveringFrom(parse.MALFORMED_MESSAGE_SEND, 0, 1)
.into(new Send({
receiver: new Literal({ value: null }),
Expand Down

0 comments on commit ab5a9a7

Please sign in to comment.