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 tests for Cairo 1 Dictionaries #182

Open
cicr99 opened this issue Dec 13, 2023 · 1 comment
Open

Add tests for Cairo 1 Dictionaries #182

cicr99 opened this issue Dec 13, 2023 · 1 comment
Labels
Duration: few days Will take a few days and might need feedback from several people tests

Comments

@cicr99
Copy link
Contributor

cicr99 commented Dec 13, 2023

Refer to #146 (comment)

@quasilyte
Copy link
Contributor

I can't find any example of dict usage that doesn't involve alloc in one form or another (now I see that it all boils down to the cairo0 segment allocation hint, this connection wasn't that clear before).

The only way to test the dicts right now is to use hints along with their runner directly. This could work with some operations that have simpler semantics. Since I'm still trying to find what contexts involve things like ShouldSkipSquashLoop and ShouldContinueSquashLoop (it's just an example), I can only write a biased test that more or less duplicates the code logic (we write at [ap+x], we read at [ap+x] inside a test and make an assertion). These kinds of tests feel redundant.

If we had a way to write a cairo0 integration-style test file, then we could test that dictionaries work as expected. These tests are expected to make Cairo compiler to emit all relevant dict-related hints for the code.

Or maybe I'm missing some context.

@TAdev0 TAdev0 added enhancement New feature or request tests Duration: few days Will take a few days and might need feedback from several people and removed enhancement New feature or request labels Jul 23, 2024
@TAdev0 TAdev0 changed the title Add tests for Dictionaries Add tests for Cairo 1 Dictionaries Jul 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Duration: few days Will take a few days and might need feedback from several people tests
Projects
None yet
Development

No branches or pull requests

3 participants