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

unit tests #6

Closed
37 of 38 tasks
Tracked by #1
michal-kapala opened this issue Jul 3, 2023 · 2 comments
Closed
37 of 38 tasks
Tracked by #1

unit tests #6

michal-kapala opened this issue Jul 3, 2023 · 2 comments
Assignees
Labels
core Core feature interpreter Related to interpreter module lexer Related to lexer module parser Related to parser module typechecker Related to typechecker module

Comments

@michal-kapala
Copy link
Owner

michal-kapala commented Jul 3, 2023

Unit tests for each of the modules are a must before #1

Lexer

  • tokenization unit tests

Parser

  • AST validation unit tests
  • error handling tests (behaviour diff between typechecker/runtime)

Typechecker

  • selective AST validation (types, errors and warnings)
  • typical mid-typing error handling

Runtime

Type suites

  • JbNumber
  • JbBool
  • JbString
  • JbNull
  • JbArray
  • JbDictionary
  • JbBinary
  • JbDate

Function module suites

System variable suites

  • initialization

Interpreter E2E

  • real-life script suite (lexer + parser + runtime)

Typechecker E2E

  • real-life script suite (lexer + parser + typechecker)
@michal-kapala michal-kapala added core Core feature lexer Related to lexer module parser Related to parser module interpreter Related to interpreter module labels Jul 3, 2023
@michal-kapala michal-kapala added this to the Package release milestone Dec 5, 2023
@michal-kapala
Copy link
Owner Author

michal-kapala commented Dec 12, 2023

Approach

Operators

Operator tests should include every possible type combination:

  • every pair of types for assignments and binary operators
  • each of 8 available types for unary operators

Functions

Similarly, every supported function implementation should have tests for every argument type combination, including the optional arguments if available. Additionally, edge case values with unexpected conversions should be covered.

QA suite

While other unit tests should be short and of single responsibility, a suite of longer real-life scripts should be created to detect complex bugs/issues. Coverage limits for these are to be defined later.

@michal-kapala michal-kapala mentioned this issue Dec 20, 2023
9 tasks
@michal-kapala michal-kapala self-assigned this Jan 12, 2024
@michal-kapala michal-kapala added the typechecker Related to typechecker module label Jan 12, 2024
@michal-kapala
Copy link
Owner Author

michal-kapala commented Mar 23, 2024

Closed by c4ecc44

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Core feature interpreter Related to interpreter module lexer Related to lexer module parser Related to parser module typechecker Related to typechecker module
Projects
Status: Done
Development

No branches or pull requests

1 participant