Skip to content

Commit

Permalink
test: remove test deserializing a Miden package example build by the …
Browse files Browse the repository at this point in the history
…compiler

Reasons:
- The `Package` serialization proptests and testing `LibraryPath`,
`ProcedureName` with example names produced by the compiler are enough;
- The test is fragile and brakes on any change to `Package` underlying
  types serialization. Updating the `masp` file is non-trivial;
  • Loading branch information
greenhat committed Dec 20, 2024
1 parent 9e240e0 commit 9886dc6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions package/src/tests.rs
Original file line number Diff line number Diff line change
@@ -1,24 +1,10 @@
use proptest::test_runner::Config;
use std::{dbg, format};
use std::format;

use proptest::{prelude::*, test_runner::TestRunner};

use super::*;

#[ignore = "update the binary atfer the changes in the Miden package format are settled"]
#[test]
fn basic_wallet_package_deserialization() {
// Test for the https://github.com/0xPolygonMiden/compiler/issues/347
// The included Miden package file is built at
// https://github.com/0xPolygonMiden/compiler/blob/6cd29e17b34c5abef7f6328c33af06f8bf203344/tests/integration/src/rust_masm_tests/rust_sdk.rs#L48-L63

let bytes = include_bytes!("../tests/data/basic_wallet.masp");

let package = Package::read_from_bytes(bytes).unwrap();
dbg!(&package.manifest);
assert_eq!(package.name, "basic_wallet");
}

#[test]
fn package_serialization_roundtrip() {
let cases = 128; // since the test is quite expensive, 128 cases should be enough to cover all edge cases (default is 256)
Expand Down
Binary file removed package/tests/data/basic_wallet.masp
Binary file not shown.

0 comments on commit 9886dc6

Please sign in to comment.