feat: add math cairo tests under vm/src/tests/cairo_test_suite#2379
Open
naor-starkware wants to merge 14 commits intonaor/refactor/Makefile-include-test_cairo_suite_targetfrom
Open
feat: add math cairo tests under vm/src/tests/cairo_test_suite#2379naor-starkware wants to merge 14 commits intonaor/refactor/Makefile-include-test_cairo_suite_targetfrom
naor-starkware wants to merge 14 commits intonaor/refactor/Makefile-include-test_cairo_suite_targetfrom
Conversation
6 tasks
Collaborator
Author
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
This was referenced Mar 29, 2026
|
Benchmark Results for unmodified programs 🚀
|
421425b to
981fce6
Compare
646dd9e to
2bc600b
Compare
981fce6 to
4e1af25
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## naor/refactor/Makefile-include-test_cairo_suite_target #2379 +/- ##
=======================================================================================
Coverage 96.07% 96.07%
=======================================================================================
Files 107 107
Lines 37852 37852
=======================================================================================
Hits 36366 36366
Misses 1486 1486 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
naor-starkware
added a commit
that referenced
this pull request
Mar 29, 2026
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
4e1af25 to
fa0fe77
Compare
2bc600b to
6fd8964
Compare
naor-starkware
added a commit
that referenced
this pull request
Mar 29, 2026
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
fa0fe77 to
fd27b62
Compare
c106a57 to
106cbb4
Compare
naor-starkware
added a commit
that referenced
this pull request
Mar 30, 2026
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
106cbb4 to
ff56720
Compare
fd27b62 to
1e0b48e
Compare
naor-starkware
added a commit
that referenced
this pull request
Apr 6, 2026
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1e0b48e to
fd5cce6
Compare
ff56720 to
6c03214
Compare
naor-starkware
added a commit
that referenced
this pull request
Apr 6, 2026
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
6c03214 to
d11f204
Compare
fd5cce6 to
985c1fe
Compare
6 tasks
naor-starkware
added a commit
that referenced
this pull request
Apr 7, 2026
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
985c1fe to
f0f279f
Compare
d11f204 to
b2799c2
Compare
- Create cairo_test_suite module skeleton (mod.rs, test_math/mod.rs) - Add main_math_test.cairo stub (imports all math.cairo functions) - Add math_test_utils.rs (RC_BOUND, MAX_DIV, is_quad_residue_mod_prime) - Move test_math_cairo.rs from cairo_test_suite/, update all imports - cairo_vm:: → crate:: for all internal paths - crate::error_utils → crate::test_helpers::error_utils - cairo_function_runner → function_runner module path - Fix 5x runner.runner.vm → runner.vm (old struct design remnant) - Register cairo_test_suite mod behind function_runner feature Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- new() → new_for_testing() (type alias has no 1-arg constructor) - runner.get_return_values() → runner.vm.get_return_values() (method is on VirtualMachine) - Add missing macro imports: assert_mr_eq! and load_cairo_program! Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Rename main_math_test.cairo → math_test.cairo for clarity. Add `from starkware.cairo.common.math_utils import horner_eval` so the compiled JSON includes horner_eval (used in test_horner_eval). Update the load_cairo_program! call to reference math_test.json. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add missing assert_not_nullptr, safe_div, safe_mult. Move horner_eval and assert_is_power_of_2 into the math.cairo import block (both are defined there, not in math_utils). Match declaration order to match math.cairo. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Remove isize from MaybeRelocatable tuple literals (inferred from From impl) - Remove usize from add_usize() calls (inferred from param type) - Remove _i64 suffixes in split_int cases (inferred from param types) - Remove usize from shift/bit operations - Use type annotation on variable instead of inline i64 suffixes on literals Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
CairoFunctionRunner type alias was removed, use CairoRunner directly. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
f0f279f to
d6a6c58
Compare
b2799c2 to
f0bb2d0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

TITLE
Description
Description of the pull request changes and motivation.
Checklist
This change is