0xMiden / 0xMiden/compiler

Tests arith ops overflowing behaves as expected

Đang mở
#1,299 1 bình luận 0 reaction 1 người được giao Được @mooori nhận Xem trên GitHub
Ngôn ngữ chính
Rust
Star
115
Fork
84
Merge trung bình
1 ngày 8 giờ
Pull request đã merge (30 ngày)
15

Mô tả

Ranges are chosen to avoid overflow as `test_int_op!` and related macros only handle the happy path. It seems like we don't yet have tests which verify plain (i.e. not checked/overflowing) arith ops behave as expected in the VM when the result overflows?

_Originally posted by @mooori in https://github.com/0xMiden/compiler/pull/1287#pullrequestreview-4827928194_

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Look at the existing test macros like `test_int_op!` in the codebase to understand the current testing pattern. Find the VM's arithmetic operation implementations to see how overflow is handled. Write new tests that trigger overflow for plain arithmetic operations (add, sub, mul) and verify the VM's behavior matches expectations.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
rust
Lĩnh vực
testing
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Ít trao đổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
55/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.