gosub-engine icon indicating copy to clipboard operation
gosub-engine copied to clipboard

Add all to tokenizer tests from `css-parsing-tests`

Open neuodev opened this issue 1 year ago • 2 comments

To ensure that our CSS3 tokenizer adheres to the CSS3 specifications, we should include all tests from the css-parsing-tests repo.

I have already added a lot of tests, and the tokenizer is passing them all, but it is best to add them all to ensure we are covering all bases.

I will add some here and there, but for the time being, I will focus on the CSS3 parser.

Writing tests should be simple. Here is an example of writing this test from css-parsing-test into our tests

Considering the tokenizer, we only interested in tests in component_value_list.json file

neuodev avatar Oct 24 '23 08:10 neuodev

Are we copying / transforming these tests into our codebase? Or could we use the tests "as-is" and have our code transform anything? I would opt for the latter, as we don't want to clutter our codebase with other people's code too much.

jaytaph avatar Oct 24 '23 11:10 jaytaph

I believe these tests were written for the "parser" rather than the "tokenizer," which is why I am using a single file.

I am planning to use this method for testing, after getting the parser ready, It will be better to use these tests "s-id"

neuodev avatar Oct 24 '23 20:10 neuodev