Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add grammar tests for handling + + and - - operations #1351

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

xpyctumo
Copy link
Contributor

Issue

Closes #1267

Checklist

  • I have updated CHANGELOG.md
  • I have run all the tests locally and no test failure was reported
  • I have run the linter, formatter and spellchecker
  • I did not do unrelated and/or undiscussed refactorings

❗ Currently the tests will fail because the tests are currently running simultaneously with the new and old parser.

@xpyctumo xpyctumo added kind: testing Tests (*.spec.ts) scope: parser Implementation of parser (src/grammar) labels Jan 16, 2025
@xpyctumo xpyctumo added this to the Doc: 2025-01 milestone Jan 16, 2025
@xpyctumo xpyctumo requested a review from a team as a code owner January 16, 2025 12:00
@xpyctumo
Copy link
Contributor Author

<unknown>:2:28: Expected not "-"

    Line 2, col 28:
      1 | contract Foo {
    > 2 |     a: Int as coins = 123 - -456;
                                     ^
      3 |     b: Int as coins = 123 + -456;

      18 |         // eslint-disable-next-line @typescript-eslint/no-explicit-any
      19 |         const message = `Expected ${(matchResult as any).getExpectedText()}\n`;
    > 20 |         throw new TactCompilationError(display.at(source, message), source);
         |               ^
      21 |     },
      22 | });

The old parser will return this error.
Is it possible for us to somehow separate the new/old parser and tests now?

@novusnota novusnota modified the milestones: Doc: 2025-01, v1.6.0 Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: testing Tests (*.spec.ts) scope: parser Implementation of parser (src/grammar)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add grammar tests with + + and - -
2 participants