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

fix(lib): correctly match expected tokens #378

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

fix(lib): correctly match expected tokens #378

wants to merge 2 commits into from

Conversation

jeertmans
Copy link
Collaborator

PR inspired by #265 (comment).

Currently, this only adds new (failing) tests that should (hopefully) all pass after the fix has been committed.

@jameshurt, can you check this and explain how we can implement the fix your mentioned? If you prefer, feel free to create your own PR :-)

When trying to implement what you said, I still had a failing test, in css.rs, see:

running 3 tests
test css::test_word_spacing ... ok
test css::test_line_height ... ok
test css::test_letter_spacing ... FAILED

failures:

---- css::test_letter_spacing stdout ----
thread 'css::test_letter_spacing' panicked at /export/home/eertmans/repositories/logos/tests/src/lib.rs:101:9:
assertion `left == right` failed
  left: (Err(()), "42e", 21..24)
 right: (Ok(Number), "42", 21..23)
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace


failures:
    css::test_letter_spacing

Copy link

github-actions bot commented Feb 19, 2024

Benchmark results:

group                                         before                                 changes
-----                                         ------                                 -------
count_ok/identifiers                          1.00   829.2±20.33ns   896.0 MB/sec    1.01    834.5±9.44ns   890.3 MB/sec
count_ok/keywords_operators_and_punctators    1.00      2.5±0.07µs   826.6 MB/sec    1.02      2.5±0.04µs   812.5 MB/sec
count_ok/strings                              1.00   535.1±19.24ns  1552.3 MB/sec    1.09    580.9±6.97ns  1430.0 MB/sec
iterate/identifiers                           1.00   827.0±11.57ns   898.4 MB/sec    1.01   838.1±57.41ns   886.4 MB/sec
iterate/keywords_operators_and_punctators     1.00      2.6±0.05µs   789.7 MB/sec    1.03      2.6±0.05µs   769.0 MB/sec
iterate/strings                               1.07   577.3±11.32ns  1438.7 MB/sec    1.00   537.2±26.59ns  1546.4 MB/sec

@marcospb19
Copy link
Contributor

Tests are failing so I'm assuming this is a draft not ready for reviewing yet.

@jeertmans
Copy link
Collaborator Author

Tests are failing so I'm assuming this is a draft not ready for reviewing yet.

Yes indeed, I am waiting for a response from the author of the comment mentioned above :-)

@jeertmans
Copy link
Collaborator Author

Note: the path from @elenakrittik should (if solves the issue) be cleaned up as it makes some function useless (like always returning None from switch?).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants