From d51428af8726ad948ff291879d6a7a1a9744760c Mon Sep 17 00:00:00 2001 From: Ashok Menon Date: Thu, 28 Mar 2024 12:54:34 +0000 Subject: [PATCH] fixup: Clean-up external crate tests --- external-crates/move/Cargo.lock | 1 + .../bytecode-verifier-tests/src/unit_tests/binary_samples.rs | 3 ++- .../bytecode-verifier-tests/src/unit_tests/code_unit_tests.rs | 2 +- .../src/unit_tests/control_flow_tests.rs | 2 +- .../bytecode-verifier-tests/src/unit_tests/large_type_test.rs | 2 +- .../bytecode-verifier-tests/src/unit_tests/limit_tests.rs | 4 +--- .../crates/bytecode-verifier-tests/src/unit_tests/locals.rs | 2 +- .../bytecode-verifier-tests/src/unit_tests/many_back_edges.rs | 2 +- .../src/unit_tests/negative_stack_size_tests.rs | 2 +- .../src/unit_tests/reference_safety_tests.rs | 2 +- .../bytecode-verifier-tests/src/unit_tests/signature_tests.rs | 3 +-- .../move-bytecode-verifier/bytecode-verifier-tests/Cargo.toml | 2 +- .../bytecode-verifier-tests/src/unit_tests/binary_samples.rs | 3 ++- .../bytecode-verifier-tests/src/unit_tests/large_type_test.rs | 2 +- .../bytecode-verifier-tests/src/unit_tests/locals.rs | 2 +- .../bytecode-verifier-tests/src/unit_tests/many_back_edges.rs | 2 +- .../src/unit_tests/reference_safety_tests.rs | 2 +- 17 files changed, 19 insertions(+), 19 deletions(-) diff --git a/external-crates/move/Cargo.lock b/external-crates/move/Cargo.lock index e4bc8ee7611ee..96b10e09d75e0 100644 --- a/external-crates/move/Cargo.lock +++ b/external-crates/move/Cargo.lock @@ -322,6 +322,7 @@ dependencies = [ "invalid-mutations", "move-binary-format", "move-bytecode-verifier", + "move-bytecode-verifier-meter", "move-core-types", "move-vm-config", "petgraph", diff --git a/external-crates/move/crates/bytecode-verifier-tests/src/unit_tests/binary_samples.rs b/external-crates/move/crates/bytecode-verifier-tests/src/unit_tests/binary_samples.rs index 2c506070ce8ca..71dd89914222e 100644 --- a/external-crates/move/crates/bytecode-verifier-tests/src/unit_tests/binary_samples.rs +++ b/external-crates/move/crates/bytecode-verifier-tests/src/unit_tests/binary_samples.rs @@ -8,7 +8,8 @@ use crate::unit_tests::production_config; use move_binary_format::{errors::VMResult, CompiledModule}; -use move_bytecode_verifier::{meter::BoundMeter, verifier}; +use move_bytecode_verifier::verifier; +use move_bytecode_verifier_meter::bound::BoundMeter; #[allow(unused)] fn run_binary_test(name: &str, bytes: &str) -> VMResult<()> { diff --git a/external-crates/move/crates/bytecode-verifier-tests/src/unit_tests/code_unit_tests.rs b/external-crates/move/crates/bytecode-verifier-tests/src/unit_tests/code_unit_tests.rs index d20f900a2a77a..23594314fa850 100644 --- a/external-crates/move/crates/bytecode-verifier-tests/src/unit_tests/code_unit_tests.rs +++ b/external-crates/move/crates/bytecode-verifier-tests/src/unit_tests/code_unit_tests.rs @@ -4,8 +4,8 @@ use crate::support::dummy_procedure_module; use move_binary_format::file_format::Bytecode; -use move_bytecode_verifier_meter::dummy::DummyMeter; use move_bytecode_verifier::CodeUnitVerifier; +use move_bytecode_verifier_meter::dummy::DummyMeter; use move_core_types::vm_status::StatusCode; use move_vm_config::verifier::VerifierConfig; diff --git a/external-crates/move/crates/bytecode-verifier-tests/src/unit_tests/control_flow_tests.rs b/external-crates/move/crates/bytecode-verifier-tests/src/unit_tests/control_flow_tests.rs index a7f1fa65f67d2..37cef3dd83961 100644 --- a/external-crates/move/crates/bytecode-verifier-tests/src/unit_tests/control_flow_tests.rs +++ b/external-crates/move/crates/bytecode-verifier-tests/src/unit_tests/control_flow_tests.rs @@ -9,7 +9,7 @@ use move_binary_format::{ file_format::{Bytecode, CompiledModule, FunctionDefinitionIndex, TableIndex}, }; use move_bytecode_verifier::control_flow; -use move_bytecode_verifier_meter::dummy::DummyMeter;; +use move_bytecode_verifier_meter::dummy::DummyMeter; use move_core_types::vm_status::StatusCode; use move_vm_config::verifier::VerifierConfig; diff --git a/external-crates/move/crates/bytecode-verifier-tests/src/unit_tests/large_type_test.rs b/external-crates/move/crates/bytecode-verifier-tests/src/unit_tests/large_type_test.rs index f42b02e750b1c..ace668c067edc 100644 --- a/external-crates/move/crates/bytecode-verifier-tests/src/unit_tests/large_type_test.rs +++ b/external-crates/move/crates/bytecode-verifier-tests/src/unit_tests/large_type_test.rs @@ -7,7 +7,7 @@ use move_binary_format::file_format::{ IdentifierIndex, ModuleHandleIndex, Signature, SignatureIndex, SignatureToken, Visibility::Public, }; -use move_bytecode_verifier_meter::BoundMeter; +use move_bytecode_verifier_meter::bound::BoundMeter; use move_core_types::{identifier::Identifier, vm_status::StatusCode}; const NUM_LOCALS: u8 = 64; diff --git a/external-crates/move/crates/bytecode-verifier-tests/src/unit_tests/limit_tests.rs b/external-crates/move/crates/bytecode-verifier-tests/src/unit_tests/limit_tests.rs index 7212e8ac997d6..8838d6b76b50c 100644 --- a/external-crates/move/crates/bytecode-verifier-tests/src/unit_tests/limit_tests.rs +++ b/external-crates/move/crates/bytecode-verifier-tests/src/unit_tests/limit_tests.rs @@ -3,9 +3,7 @@ use crate::unit_tests::production_config; use move_binary_format::file_format::*; -use move_bytecode_verifier::{ - limits::LimitsVerifier, verify_module_with_config_for_test, -}; +use move_bytecode_verifier::{limits::LimitsVerifier, verify_module_with_config_for_test}; use move_bytecode_verifier_meter::dummy::DummyMeter; use move_core_types::{ account_address::AccountAddress, identifier::Identifier, vm_status::StatusCode, diff --git a/external-crates/move/crates/bytecode-verifier-tests/src/unit_tests/locals.rs b/external-crates/move/crates/bytecode-verifier-tests/src/unit_tests/locals.rs index 90a271114aa09..6655aba3a6f15 100644 --- a/external-crates/move/crates/bytecode-verifier-tests/src/unit_tests/locals.rs +++ b/external-crates/move/crates/bytecode-verifier-tests/src/unit_tests/locals.rs @@ -7,7 +7,7 @@ use move_binary_format::file_format::{ IdentifierIndex, ModuleHandleIndex, Signature, SignatureIndex, SignatureToken, Visibility::Public, }; -use move_bytecode_verifier_meter::BoundMeter; +use move_bytecode_verifier_meter::bound::BoundMeter; use move_core_types::{identifier::Identifier, vm_status::StatusCode}; #[test] diff --git a/external-crates/move/crates/bytecode-verifier-tests/src/unit_tests/many_back_edges.rs b/external-crates/move/crates/bytecode-verifier-tests/src/unit_tests/many_back_edges.rs index 5f8d2ac254413..fb5ab33b4094d 100644 --- a/external-crates/move/crates/bytecode-verifier-tests/src/unit_tests/many_back_edges.rs +++ b/external-crates/move/crates/bytecode-verifier-tests/src/unit_tests/many_back_edges.rs @@ -7,7 +7,7 @@ use move_binary_format::file_format::{ IdentifierIndex, ModuleHandleIndex, Signature, SignatureIndex, SignatureToken, Visibility::Public, }; -use move_bytecode_verifier_meter::BoundMeter; +use move_bytecode_verifier_meter::bound::BoundMeter; use move_core_types::{identifier::Identifier, vm_status::StatusCode}; const MAX_BASIC_BLOCKS: u16 = 1024; diff --git a/external-crates/move/crates/bytecode-verifier-tests/src/unit_tests/negative_stack_size_tests.rs b/external-crates/move/crates/bytecode-verifier-tests/src/unit_tests/negative_stack_size_tests.rs index 9685d7a689a68..9f9eb9327e916 100644 --- a/external-crates/move/crates/bytecode-verifier-tests/src/unit_tests/negative_stack_size_tests.rs +++ b/external-crates/move/crates/bytecode-verifier-tests/src/unit_tests/negative_stack_size_tests.rs @@ -4,8 +4,8 @@ use crate::support::dummy_procedure_module; use move_binary_format::file_format::Bytecode; -use move_bytecode_verifier_meter::dummy::DummyMeter; use move_bytecode_verifier::CodeUnitVerifier; +use move_bytecode_verifier_meter::dummy::DummyMeter; use move_core_types::vm_status::StatusCode; #[test] diff --git a/external-crates/move/crates/bytecode-verifier-tests/src/unit_tests/reference_safety_tests.rs b/external-crates/move/crates/bytecode-verifier-tests/src/unit_tests/reference_safety_tests.rs index 92a6ceaec4ebd..5ca42339af1e1 100644 --- a/external-crates/move/crates/bytecode-verifier-tests/src/unit_tests/reference_safety_tests.rs +++ b/external-crates/move/crates/bytecode-verifier-tests/src/unit_tests/reference_safety_tests.rs @@ -8,7 +8,7 @@ use move_binary_format::file_format::{ IdentifierIndex, ModuleHandleIndex, Signature, SignatureIndex, SignatureToken, Visibility::Public, }; -use move_bytecode_verifier_meter::BoundMeter; +use move_bytecode_verifier_meter::bound::BoundMeter; use move_core_types::{identifier::Identifier, vm_status::StatusCode}; #[test] diff --git a/external-crates/move/crates/bytecode-verifier-tests/src/unit_tests/signature_tests.rs b/external-crates/move/crates/bytecode-verifier-tests/src/unit_tests/signature_tests.rs index ea6eb23d499e0..440071c3ef770 100644 --- a/external-crates/move/crates/bytecode-verifier-tests/src/unit_tests/signature_tests.rs +++ b/external-crates/move/crates/bytecode-verifier-tests/src/unit_tests/signature_tests.rs @@ -8,8 +8,7 @@ use move_binary_format::file_format::{ Bytecode::*, CompiledModule, SignatureToken::*, Visibility::Public, *, }; use move_bytecode_verifier::{ - verify_module_unmetered, verify_module_with_config_for_test, - SignatureChecker, + verify_module_unmetered, verify_module_with_config_for_test, SignatureChecker, }; use move_bytecode_verifier_meter::dummy::DummyMeter; use move_core_types::{ diff --git a/external-crates/move/move-execution/v0/move-bytecode-verifier/bytecode-verifier-tests/Cargo.toml b/external-crates/move/move-execution/v0/move-bytecode-verifier/bytecode-verifier-tests/Cargo.toml index 7bfdc336bf73f..4ef1f7a924f42 100644 --- a/external-crates/move/move-execution/v0/move-bytecode-verifier/bytecode-verifier-tests/Cargo.toml +++ b/external-crates/move/move-execution/v0/move-bytecode-verifier/bytecode-verifier-tests/Cargo.toml @@ -18,7 +18,7 @@ hex.workspace = true invalid-mutations.workspace = true move-binary-format = { workspace = true, features = ["fuzzing"] } move-bytecode-verifier.workspace = true -move-bytecode-verifier-tests.workspace = true +move-bytecode-verifier-meter.workspace = true move-core-types.workspace = true move-vm-config.workspace = true diff --git a/external-crates/move/move-execution/v0/move-bytecode-verifier/bytecode-verifier-tests/src/unit_tests/binary_samples.rs b/external-crates/move/move-execution/v0/move-bytecode-verifier/bytecode-verifier-tests/src/unit_tests/binary_samples.rs index 2c506070ce8ca..71dd89914222e 100644 --- a/external-crates/move/move-execution/v0/move-bytecode-verifier/bytecode-verifier-tests/src/unit_tests/binary_samples.rs +++ b/external-crates/move/move-execution/v0/move-bytecode-verifier/bytecode-verifier-tests/src/unit_tests/binary_samples.rs @@ -8,7 +8,8 @@ use crate::unit_tests::production_config; use move_binary_format::{errors::VMResult, CompiledModule}; -use move_bytecode_verifier::{meter::BoundMeter, verifier}; +use move_bytecode_verifier::verifier; +use move_bytecode_verifier_meter::bound::BoundMeter; #[allow(unused)] fn run_binary_test(name: &str, bytes: &str) -> VMResult<()> { diff --git a/external-crates/move/move-execution/v0/move-bytecode-verifier/bytecode-verifier-tests/src/unit_tests/large_type_test.rs b/external-crates/move/move-execution/v0/move-bytecode-verifier/bytecode-verifier-tests/src/unit_tests/large_type_test.rs index f42b02e750b1c..ace668c067edc 100644 --- a/external-crates/move/move-execution/v0/move-bytecode-verifier/bytecode-verifier-tests/src/unit_tests/large_type_test.rs +++ b/external-crates/move/move-execution/v0/move-bytecode-verifier/bytecode-verifier-tests/src/unit_tests/large_type_test.rs @@ -7,7 +7,7 @@ use move_binary_format::file_format::{ IdentifierIndex, ModuleHandleIndex, Signature, SignatureIndex, SignatureToken, Visibility::Public, }; -use move_bytecode_verifier_meter::BoundMeter; +use move_bytecode_verifier_meter::bound::BoundMeter; use move_core_types::{identifier::Identifier, vm_status::StatusCode}; const NUM_LOCALS: u8 = 64; diff --git a/external-crates/move/move-execution/v0/move-bytecode-verifier/bytecode-verifier-tests/src/unit_tests/locals.rs b/external-crates/move/move-execution/v0/move-bytecode-verifier/bytecode-verifier-tests/src/unit_tests/locals.rs index df69e472d8288..dbd9b98e270d0 100644 --- a/external-crates/move/move-execution/v0/move-bytecode-verifier/bytecode-verifier-tests/src/unit_tests/locals.rs +++ b/external-crates/move/move-execution/v0/move-bytecode-verifier/bytecode-verifier-tests/src/unit_tests/locals.rs @@ -7,7 +7,7 @@ use move_binary_format::file_format::{ IdentifierIndex, ModuleHandleIndex, Signature, SignatureIndex, SignatureToken, Visibility::Public, }; -use move_bytecode_verifier_meter::BoundMeter; +use move_bytecode_verifier_meter::bound::BoundMeter; use move_core_types::{identifier::Identifier, vm_status::StatusCode}; #[test] diff --git a/external-crates/move/move-execution/v0/move-bytecode-verifier/bytecode-verifier-tests/src/unit_tests/many_back_edges.rs b/external-crates/move/move-execution/v0/move-bytecode-verifier/bytecode-verifier-tests/src/unit_tests/many_back_edges.rs index c340d9ae2bfd6..8010abfd2b7e1 100644 --- a/external-crates/move/move-execution/v0/move-bytecode-verifier/bytecode-verifier-tests/src/unit_tests/many_back_edges.rs +++ b/external-crates/move/move-execution/v0/move-bytecode-verifier/bytecode-verifier-tests/src/unit_tests/many_back_edges.rs @@ -7,7 +7,7 @@ use move_binary_format::file_format::{ IdentifierIndex, ModuleHandleIndex, Signature, SignatureIndex, SignatureToken, Visibility::Public, }; -use move_bytecode_verifier_meter::BoundMeter; +use move_bytecode_verifier_meter::bound::BoundMeter; use move_core_types::{identifier::Identifier, vm_status::StatusCode}; const MAX_BASIC_BLOCKS: u16 = 1024; diff --git a/external-crates/move/move-execution/v0/move-bytecode-verifier/bytecode-verifier-tests/src/unit_tests/reference_safety_tests.rs b/external-crates/move/move-execution/v0/move-bytecode-verifier/bytecode-verifier-tests/src/unit_tests/reference_safety_tests.rs index 92a6ceaec4ebd..5ca42339af1e1 100644 --- a/external-crates/move/move-execution/v0/move-bytecode-verifier/bytecode-verifier-tests/src/unit_tests/reference_safety_tests.rs +++ b/external-crates/move/move-execution/v0/move-bytecode-verifier/bytecode-verifier-tests/src/unit_tests/reference_safety_tests.rs @@ -8,7 +8,7 @@ use move_binary_format::file_format::{ IdentifierIndex, ModuleHandleIndex, Signature, SignatureIndex, SignatureToken, Visibility::Public, }; -use move_bytecode_verifier_meter::BoundMeter; +use move_bytecode_verifier_meter::bound::BoundMeter; use move_core_types::{identifier::Identifier, vm_status::StatusCode}; #[test]