0xMiden / 0xMiden/miden-vm

Unit tests for private MASM procedures

Đang mở
#1,618 3 bình luận 1 reaction 1 người được giao Được giao cho @bitwalker Xem trên GitHub
assembly debugging
Ngôn ngữ chính
Rust
Star
772
Fork
352
Merge trung bình
1 ngày 12 giờ
Pull request đã merge (30 ngày)
93

Mô tả

### Feature description

In miden-base, we would like to be able to write unit tests for private (non-`export`ed) MASM procedures.

Ideally we could write these unit tests as Rust tests (mostly for integration in the Rust test setup and because we can setup the environment a bit better in case tests fail and a developer needs to debug), but this requires the MASM procedures to be exported. For now, we might just export them, but longer term it would be nice to have a better way to do this.

In talking with @bobbinth, one idea was to use procedure annotations (#1434) to conditionally assemble procedures to be either `proc` in normal usage or `export` if we want to build a `MastForest` library to test these procedures through.

A similar idea is to write unit tests directly in MASM behind a `#[cfg(test)]` like flag through which we could assemble a MASM test program. This would keep the procedure definitions itself cleaner (without `cfg` annotations on each).

### Why is this feature needed?

Ensure correctness of MASM procedures.

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

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

Đánh giá

Issue này chưa được đánh giá.

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.