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

Added a bunch more tests #2885

Merged
merged 6 commits into from
May 4, 2023
Merged

Added a bunch more tests #2885

merged 6 commits into from
May 4, 2023

Conversation

Razican
Copy link
Member

@Razican Razican commented Apr 30, 2023

As a follow up of #2883 and #2884, this PR changes the following:

  • Changed the boa_parser::error::ErrorContext trait, to now have a set_context() and context() setter and getters for context.
  • Added unit tests for parser and lexer errors.
  • Added 100% testing coverage to boa_unicode
  • Added tests for Source
  • Unified output for parser and lexer errors

@Razican Razican added parser Issues surrounding the parser lexer Issues surrounding the lexer test Issues and PRs related to the tests. ast Issue surrounding the abstract syntax tree labels Apr 30, 2023
@Razican Razican added this to the v0.17.0 milestone Apr 30, 2023
@github-actions
Copy link

github-actions bot commented Apr 30, 2023

Test262 conformance changes

Test result main count PR count difference
Total 94,601 94,601 0
Passed 73,293 73,293 0
Ignored 17,540 17,540 0
Failed 3,768 3,768 0
Panics 0 0 0
Conformance 77.48% 77.48% 0.00%

@codecov
Copy link

codecov bot commented Apr 30, 2023

Codecov Report

Merging #2885 (0942295) into main (c738b50) will increase coverage by 0.20%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #2885      +/-   ##
==========================================
+ Coverage   51.24%   51.44%   +0.20%     
==========================================
  Files         427      427              
  Lines       42522    42621      +99     
==========================================
+ Hits        21790    21928     +138     
+ Misses      20732    20693      -39     
Impacted Files Coverage Δ
boa_engine/src/builtins/uri/mod.rs 21.83% <ø> (ø)
boa_engine/src/value/conversions/serde_json.rs 75.75% <ø> (ø)
...src/parser/expression/assignment/arrow_function.rs 76.82% <ø> (ø)
...rser/expression/assignment/async_arrow_function.rs 0.00% <ø> (ø)
boa_parser/src/source.rs 100.00% <ø> (+62.50%) ⬆️
boa_unicode/src/lib.rs 66.66% <ø> (+66.66%) ⬆️
boa_parser/src/error/mod.rs 100.00% <100.00%> (ø)
boa_parser/src/lexer/error.rs 100.00% <100.00%> (+41.66%) ⬆️

... and 28 files with indirect coverage changes

@Razican
Copy link
Member Author

Razican commented Apr 30, 2023

I've missed a few lines, so I will adapt the tests a bit :)

@Razican
Copy link
Member Author

Razican commented May 1, 2023

Misses in coverage have been reported here: xd009642/tarpaulin#351 (comment)

@Razican
Copy link
Member Author

Razican commented May 3, 2023

@HalidOdat I removed ut_ prefixes in our codebase. I also removed them from places where we were already using them before. Let me know your thoughts :)

Copy link
Member

@HalidOdat HalidOdat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks perfect to me! :)

Copy link
Member

@jedel1043 jedel1043 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@Razican Razican added this pull request to the merge queue May 4, 2023
Merged via the queue into main with commit 7cb58de May 4, 2023
@bors bors bot deleted the more_tests branch May 4, 2023 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ast Issue surrounding the abstract syntax tree lexer Issues surrounding the lexer parser Issues surrounding the parser test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants