diff --git a/forc-pkg/src/manifest.rs b/forc-pkg/src/manifest.rs index c462a226a56..52a12b7bfdc 100644 --- a/forc-pkg/src/manifest.rs +++ b/forc-pkg/src/manifest.rs @@ -1,4 +1,5 @@ -use anyhow::{anyhow, bail}; +use crate::pkg::parsing_failed; +use anyhow::{anyhow, bail, Result}; use forc_util::{println_yellow_err, validate_name}; use serde::{Deserialize, Serialize}; use std::{ @@ -6,6 +7,8 @@ use std::{ path::{Path, PathBuf}, sync::Arc, }; + +use sway_core::{parse, TreeType}; use sway_utils::constants; #[derive(Serialize, Deserialize, Debug)] @@ -75,7 +78,7 @@ impl Manifest { /// /// This also `validate`s the manifest, returning an `Err` in the case that invalid names, /// fields were used. - pub fn from_file(path: &Path) -> anyhow::Result { + pub fn from_file(path: &Path) -> Result { let manifest_str = std::fs::read_to_string(path) .map_err(|e| anyhow!("failed to read manifest at {:?}: {}", path, e))?; let toml_de = &mut toml::de::Deserializer::new(&manifest_str); @@ -92,7 +95,7 @@ impl Manifest { /// /// This is short for `Manifest::from_file`, but takes care of constructing the path to the /// file. - pub fn from_dir(manifest_dir: &Path) -> anyhow::Result { + pub fn from_dir(manifest_dir: &Path) -> Result { let file_path = manifest_dir.join(constants::MANIFEST_FILE_NAME); Self::from_file(&file_path) } @@ -101,7 +104,7 @@ impl Manifest { /// /// This checks the project and organization names against a set of reserved/restricted /// keywords and patterns, and if a given entry point exists. - pub fn validate(&self, path: &Path) -> anyhow::Result<()> { + pub fn validate(&self, path: &Path) -> Result<()> { let mut entry_path = path.to_path_buf(); entry_path.pop(); let entry_path = entry_path @@ -129,7 +132,7 @@ impl Manifest { } /// Produces the string of the entry point file. - pub fn entry_string(&self, manifest_dir: &Path) -> anyhow::Result> { + pub fn entry_string(&self, manifest_dir: &Path) -> Result> { let entry_path = self.entry_path(manifest_dir); let entry_string = std::fs::read_to_string(&entry_path)?; Ok(Arc::from(entry_string)) @@ -150,6 +153,17 @@ impl Manifest { Dependency::Simple(_) => None, }) } + + /// Parse and return the associated project's program type. + pub fn program_type(&self, manifest_dir: PathBuf) -> Result { + let entry_string = self.entry_string(&manifest_dir)?; + let program_type = parse(entry_string, None); + + match program_type.value { + Some(parse_tree) => Ok(parse_tree.tree_type), + None => bail!(parsing_failed(&self.project.name, program_type.errors)), + } + } } fn default_entry() -> String { diff --git a/forc-pkg/src/pkg.rs b/forc-pkg/src/pkg.rs index c8ee6d9e899..7967a496105 100644 --- a/forc-pkg/src/pkg.rs +++ b/forc-pkg/src/pkg.rs @@ -2,7 +2,7 @@ use crate::{ lock::Lock, manifest::{Dependency, Manifest}, }; -use anyhow::{anyhow, bail, Context, Result}; +use anyhow::{anyhow, bail, Context, Error, Result}; use forc_util::{ find_file_name, git_checkouts_directory, kebab_to_snake_case, print_on_failure, print_on_success, print_on_success_library, println_yellow_err, @@ -16,7 +16,7 @@ use std::{ str::FromStr, }; use sway_core::{ - source_map::SourceMap, BytecodeCompilationResult, CompileAstResult, NamespaceRef, + source_map::SourceMap, BytecodeCompilationResult, CompileAstResult, CompileError, NamespaceRef, NamespaceWrapper, TreeType, TypedParseTree, }; use sway_types::JsonABI; @@ -1171,3 +1171,61 @@ fn test_source_git_pinned_parsing() { assert_eq!(&serialized, string); } } + +/// Format an error message for an absent `Forc.toml`. +pub fn manifest_file_missing(curr_dir: PathBuf) -> anyhow::Error { + let message = format!( + "could not find `{}` in `{}` or any parent directory", + constants::MANIFEST_FILE_NAME, + curr_dir.display() + ); + Error::msg(message) +} + +/// Format an error message for failed parsing of a manifest. +pub fn parsing_failed(project_name: &str, errors: Vec) -> anyhow::Error { + let error = errors + .iter() + .map(|e| e.to_friendly_error_string()) + .collect::>() + .join("\n"); + let message = format!("Parsing {} failed: \n{}", project_name, error); + Error::msg(message) +} + +/// Format an error message if an incorrect program type is present. +pub fn wrong_program_type( + project_name: &str, + expected_type: TreeType, + parse_type: TreeType, +) -> anyhow::Error { + let message = format!( + "{} is not a '{:?}' it is a '{:?}'", + project_name, expected_type, parse_type + ); + Error::msg(message) +} + +/// Format an error message if a given URL fails to produce a working node. +pub fn fuel_core_not_running(node_url: &str) -> anyhow::Error { + let message = format!("could not get a response from node at the URL {}. Start a node with `fuel-core`. See https://github.com/FuelLabs/fuel-core#running for more information", node_url); + Error::msg(message) +} + +/// Given the current directory and expected program type, determines whether the correct program type is present. +pub fn check_program_type( + manifest: &Manifest, + manifest_dir: PathBuf, + expected_type: TreeType, +) -> Result<()> { + let parsed_type = manifest.program_type(manifest_dir)?; + if parsed_type != expected_type { + bail!(wrong_program_type( + &manifest.project.name, + expected_type, + parsed_type + )); + } else { + Ok(()) + } +} diff --git a/forc/src/cli/commands/deploy.rs b/forc/src/cli/commands/deploy.rs index 43f58daf1c6..494d98963d6 100644 --- a/forc/src/cli/commands/deploy.rs +++ b/forc/src/cli/commands/deploy.rs @@ -47,7 +47,7 @@ pub struct Command { pub(crate) async fn exec(command: Command) -> Result<()> { match forc_deploy::deploy(command).await { - Err(e) => bail!(e.message), + Err(e) => bail!("{}", e), _ => Ok(()), } } diff --git a/forc/src/cli/commands/run.rs b/forc/src/cli/commands/run.rs index 947d2fbb966..fb1b4ac072a 100644 --- a/forc/src/cli/commands/run.rs +++ b/forc/src/cli/commands/run.rs @@ -89,7 +89,7 @@ pub struct Command { pub(crate) async fn exec(command: Command) -> Result<()> { match forc_run::run(command).await { - Err(e) => bail!(e.message), + Err(e) => bail!("{}", e), _ => Ok(()), } } diff --git a/forc/src/ops/forc_abi_json.rs b/forc/src/ops/forc_abi_json.rs index c81d03000da..f8c4bddd784 100644 --- a/forc/src/ops/forc_abi_json.rs +++ b/forc/src/ops/forc_abi_json.rs @@ -1,9 +1,23 @@ use crate::cli::{BuildCommand, JsonAbiCommand}; use anyhow::Result; +use forc_pkg::{check_program_type, manifest_file_missing, Manifest}; +use forc_util::find_manifest_dir; use serde_json::{json, Value}; use std::fs::File; +use std::path::PathBuf; +use sway_core::TreeType; pub fn build(command: JsonAbiCommand) -> Result { + let curr_dir = if let Some(ref path) = command.path { + PathBuf::from(path) + } else { + std::env::current_dir()? + }; + let manifest_dir = + find_manifest_dir(&curr_dir).ok_or_else(|| manifest_file_missing(curr_dir))?; + let manifest = Manifest::from_dir(&manifest_dir)?; + check_program_type(&manifest, manifest_dir, TreeType::Contract)?; + let build_command = BuildCommand { path: command.path, offline_mode: command.offline_mode, @@ -11,8 +25,10 @@ pub fn build(command: JsonAbiCommand) -> Result { minify_json_abi: command.minify, ..Default::default() }; + let compiled = crate::ops::forc_build::build(build_command)?; let json_abi = json!(compiled.json_abi); + if let Some(outfile) = command.json_outfile { let file = File::create(outfile).map_err(|e| e)?; let res = if command.minify { @@ -22,9 +38,10 @@ pub fn build(command: JsonAbiCommand) -> Result { }; res.map_err(|e| e)?; } else if command.minify { - println!("{}", json_abi); + println!("{json_abi}"); } else { println!("{:#}", json_abi); } + Ok(json_abi) } diff --git a/forc/src/ops/forc_deploy.rs b/forc/src/ops/forc_deploy.rs index 9d3a148a8fe..721c7440eba 100644 --- a/forc/src/ops/forc_deploy.rs +++ b/forc/src/ops/forc_deploy.rs @@ -1,22 +1,25 @@ use crate::cli::{BuildCommand, DeployCommand}; use crate::ops::forc_build; -use crate::utils::cli_error::CliError; -use anyhow::Result; -use forc_pkg::Manifest; +use anyhow::{bail, Result}; +use forc_pkg::{check_program_type, manifest_file_missing, Manifest}; use forc_util::find_manifest_dir; use fuel_gql_client::client::FuelClient; use fuel_tx::{Output, Salt, Transaction}; use fuel_vm::prelude::*; use std::path::PathBuf; -use sway_core::{parse, TreeType}; -use sway_utils::constants::*; +use sway_core::TreeType; +use sway_utils::constants::DEFAULT_NODE_URL; -pub async fn deploy(command: DeployCommand) -> Result { +pub async fn deploy(command: DeployCommand) -> Result { let curr_dir = if let Some(ref path) = command.path { PathBuf::from(path) } else { std::env::current_dir()? }; + let manifest_dir = + find_manifest_dir(&curr_dir).ok_or_else(|| manifest_file_missing(curr_dir))?; + let manifest = Manifest::from_dir(&manifest_dir)?; + check_program_type(&manifest, manifest_dir, TreeType::Contract)?; let DeployCommand { path, @@ -32,73 +35,40 @@ pub async fn deploy(command: DeployCommand) -> Result { - let manifest = Manifest::from_dir(&manifest_dir)?; - let project_name = &manifest.project.name; - let entry_string = manifest.entry_string(&manifest_dir)?; - - // Parse the main file and check is it a contract. - let parsed_result = parse(entry_string, None); - match parsed_result.value { - Some(parse_tree) => match parse_tree.tree_type { - TreeType::Contract => { - let build_command = BuildCommand { - path, - use_orig_asm, - print_finalized_asm, - print_intermediate_asm, - print_ir, - binary_outfile, - offline_mode, - debug_outfile, - silent_mode, - output_directory, - minify_json_abi, - }; + let build_command = BuildCommand { + path, + use_orig_asm, + print_finalized_asm, + print_intermediate_asm, + print_ir, + binary_outfile, + offline_mode, + debug_outfile, + silent_mode, + output_directory, + minify_json_abi, + }; - let compiled = forc_build::build(build_command)?; - let (tx, contract_id) = create_contract_tx( - compiled.bytecode, - Vec::::new(), - Vec::::new(), - ); + let compiled = forc_build::build(build_command)?; + let (tx, contract_id) = create_contract_tx( + compiled.bytecode, + Vec::::new(), + Vec::::new(), + ); - let node_url = match &manifest.network { - Some(network) => &network.url, - _ => DEFAULT_NODE_URL, - }; + let node_url = match &manifest.network { + Some(network) => &network.url, + _ => DEFAULT_NODE_URL, + }; - let client = FuelClient::new(node_url)?; + let client = FuelClient::new(node_url)?; - match client.submit(&tx).await { - Ok(logs) => { - println!("Logs:\n{:?}", logs); - Ok(contract_id) - } - Err(e) => Err(e.to_string().into()), - } - } - TreeType::Script => Err(CliError::wrong_sway_type( - project_name, - SWAY_CONTRACT, - SWAY_SCRIPT, - )), - TreeType::Predicate => Err(CliError::wrong_sway_type( - project_name, - SWAY_CONTRACT, - SWAY_PREDICATE, - )), - TreeType::Library { .. } => Err(CliError::wrong_sway_type( - project_name, - SWAY_CONTRACT, - SWAY_LIBRARY, - )), - }, - None => Err(CliError::parsing_failed(project_name, parsed_result.errors)), - } + match client.submit(&tx).await { + Ok(logs) => { + println!("Logs:\n{:?}", logs); + Ok(contract_id) } - None => Err(CliError::manifest_file_missing(curr_dir)), + Err(e) => bail!("{e}"), } } diff --git a/forc/src/ops/forc_run.rs b/forc/src/ops/forc_run.rs index 3bbcc2f858e..b34f090799d 100644 --- a/forc/src/ops/forc_run.rs +++ b/forc/src/ops/forc_run.rs @@ -1,110 +1,76 @@ use crate::cli::{BuildCommand, RunCommand}; use crate::ops::forc_build; -use crate::utils::cli_error::CliError; use crate::utils::parameters::TxParameters; -use forc_pkg::Manifest; +use anyhow::{anyhow, bail, Result}; +use forc_pkg::{check_program_type, fuel_core_not_running, manifest_file_missing, Manifest}; use forc_util::find_manifest_dir; use fuel_gql_client::client::FuelClient; use fuel_tx::Transaction; use futures::TryFutureExt; use std::path::PathBuf; use std::str::FromStr; -use sway_core::{parse, TreeType}; -use sway_utils::constants::*; +use sway_core::TreeType; use tokio::process::Child; -pub async fn run(command: RunCommand) -> Result<(), CliError> { +pub async fn run(command: RunCommand) -> Result<()> { let path_dir = if let Some(path) = &command.path { PathBuf::from(path) } else { - std::env::current_dir().map_err(|e| format!("{:?}", e))? + std::env::current_dir().map_err(|e| anyhow!("{:?}", e))? }; + let manifest_dir = + find_manifest_dir(&path_dir).ok_or_else(|| manifest_file_missing(path_dir))?; + let manifest = Manifest::from_dir(&manifest_dir)?; + check_program_type(&manifest, manifest_dir, TreeType::Script)?; + + let input_data = &command.data.unwrap_or_else(|| "".into()); + let data = format_hex_data(input_data); + let script_data = hex::decode(data).expect("Invalid hex"); + + let build_command = BuildCommand { + path: command.path, + use_orig_asm: command.use_orig_asm, + print_finalized_asm: command.print_finalized_asm, + print_intermediate_asm: command.print_intermediate_asm, + print_ir: command.print_ir, + binary_outfile: command.binary_outfile, + debug_outfile: command.debug_outfile, + offline_mode: false, + silent_mode: command.silent_mode, + output_directory: command.output_directory, + minify_json_abi: command.minify_json_abi, + }; + + let compiled = forc_build::build(build_command)?; + let contracts = command.contract.unwrap_or_default(); + let (inputs, outputs) = get_tx_inputs_and_outputs(contracts); + + let tx = create_tx_with_script_and_data( + compiled.bytecode, + script_data, + inputs, + outputs, + TxParameters::new(command.byte_price, command.gas_limit, command.gas_price), + ); - match find_manifest_dir(&path_dir) { - Some(manifest_dir) => { - let manifest = Manifest::from_dir(&manifest_dir)?; - let project_name = &manifest.project.name; - let entry_string = manifest.entry_string(&manifest_dir)?; - - // Parse the entry point string and check is it a script. - let parsed_result = parse(entry_string, None); - match parsed_result.value { - Some(parse_tree) => match parse_tree.tree_type { - TreeType::Script => { - let input_data = &command.data.unwrap_or_else(|| "".into()); - let data = format_hex_data(input_data); - let script_data = hex::decode(data).expect("Invalid hex"); - - let build_command = BuildCommand { - path: command.path, - use_orig_asm: command.use_orig_asm, - print_finalized_asm: command.print_finalized_asm, - print_intermediate_asm: command.print_intermediate_asm, - print_ir: command.print_ir, - binary_outfile: command.binary_outfile, - debug_outfile: command.debug_outfile, - offline_mode: false, - silent_mode: command.silent_mode, - output_directory: command.output_directory, - minify_json_abi: command.minify_json_abi, - }; - - let compiled = forc_build::build(build_command)?; - let contracts = command.contract.unwrap_or_default(); - let (inputs, outputs) = get_tx_inputs_and_outputs(contracts); - - let tx = create_tx_with_script_and_data( - compiled.bytecode, - script_data, - inputs, - outputs, - TxParameters::new( - command.byte_price, - command.gas_limit, - command.gas_price, - ), - ); - - if command.dry_run { - println!("{:?}", tx); - Ok(()) - } else { - let node_url = match &manifest.network { - Some(network) => &network.url, - _ => &command.node_url, - }; - - let child = try_send_tx(node_url, &tx, command.pretty_print).await?; - - if command.kill_node { - if let Some(mut child) = child { - child.kill().await.expect("Node should be killed"); - } - } - - Ok(()) - } - } - TreeType::Contract => Err(CliError::wrong_sway_type( - project_name, - SWAY_SCRIPT, - SWAY_CONTRACT, - )), - TreeType::Predicate => Err(CliError::wrong_sway_type( - project_name, - SWAY_SCRIPT, - SWAY_PREDICATE, - )), - TreeType::Library { .. } => Err(CliError::wrong_sway_type( - project_name, - SWAY_SCRIPT, - SWAY_LIBRARY, - )), - }, - None => Err(CliError::parsing_failed(project_name, parsed_result.errors)), + if command.dry_run { + println!("{:?}", tx); + Ok(()) + } else { + let node_url = match &manifest.network { + Some(network) => &network.url, + _ => &command.node_url, + }; + + let child = try_send_tx(node_url, &tx, command.pretty_print).await?; + + if command.kill_node { + if let Some(mut child) = child { + child.kill().await.expect("Node should be killed"); } } - None => Err(CliError::manifest_file_missing(path_dir)), + + Ok(()) } } @@ -112,7 +78,7 @@ async fn try_send_tx( node_url: &str, tx: &Transaction, pretty_print: bool, -) -> Result, CliError> { +) -> Result> { let client = FuelClient::new(node_url)?; match client.health().await { @@ -120,15 +86,11 @@ async fn try_send_tx( send_tx(&client, tx, pretty_print).await?; Ok(None) } - Err(_) => Err(CliError::fuel_core_not_running(node_url)), + Err(_) => Err(fuel_core_not_running(node_url)), } } -async fn send_tx( - client: &FuelClient, - tx: &Transaction, - pretty_print: bool, -) -> Result<(), CliError> { +async fn send_tx(client: &FuelClient, tx: &Transaction, pretty_print: bool) -> Result<()> { let id = format!("{:#x}", tx.id()); match client .submit(tx) @@ -143,7 +105,7 @@ async fn send_tx( } Ok(()) } - Err(e) => Err(e.to_string().into()), + Err(e) => bail!("{e}"), } } diff --git a/forc/src/utils/cli_error.rs b/forc/src/utils/cli_error.rs deleted file mode 100644 index 2314ea1bf54..00000000000 --- a/forc/src/utils/cli_error.rs +++ /dev/null @@ -1,91 +0,0 @@ -use std::net::AddrParseError; -use std::path::PathBuf; -use std::{fmt, io}; - -use sway_core::CompileError; -use sway_utils::constants::MANIFEST_FILE_NAME; - -#[derive(Debug)] -pub struct CliError { - pub message: String, -} - -impl CliError { - pub fn manifest_file_missing(curr_dir: PathBuf) -> Self { - let message = format!( - "could not find `{}` in `{}` or any parent directory", - MANIFEST_FILE_NAME, - curr_dir.display() - ); - Self { message } - } - - pub fn parsing_failed(project_name: &str, errors: Vec) -> Self { - let message = errors - .iter() - .map(|e| e.to_friendly_error_string()) - .collect::>() - .join("\n"); - - Self { - message: format!("Parsing {} failed: \n{}", project_name, message), - } - } - - pub fn wrong_sway_type(project_name: &str, wanted_type: &str, parse_type: &str) -> Self { - let message = format!( - "{} is not a '{}' it is a '{}'", - project_name, wanted_type, parse_type - ); - Self { message } - } - - pub fn fuel_core_not_running(node_url: &str) -> Self { - let message = format!("could not get a response from node at the URL {}. Start a node with `fuel-core`. See https://github.com/FuelLabs/fuel-core#running for more information", node_url); - Self { message } - } -} - -impl fmt::Display for CliError { - fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { - write!(f, "{}", self) - } -} - -impl From<&str> for CliError { - fn from(s: &str) -> Self { - CliError { - message: s.to_string(), - } - } -} - -impl From for CliError { - fn from(s: String) -> Self { - CliError { message: s } - } -} - -impl From for CliError { - fn from(e: io::Error) -> Self { - CliError { - message: e.to_string(), - } - } -} - -impl From for CliError { - fn from(e: AddrParseError) -> Self { - CliError { - message: e.to_string(), - } - } -} - -impl From for CliError { - fn from(e: anyhow::Error) -> Self { - CliError { - message: e.to_string(), - } - } -} diff --git a/forc/src/utils/mod.rs b/forc/src/utils/mod.rs index d46782930d8..a717b64bcd6 100644 --- a/forc/src/utils/mod.rs +++ b/forc/src/utils/mod.rs @@ -1,4 +1,3 @@ -pub mod cli_error; pub mod client; pub mod defaults; pub mod parameters; diff --git a/sway-core/src/semantic_analysis/syntax_tree.rs b/sway-core/src/semantic_analysis/syntax_tree.rs index 80ce45d1e53..4ffd69d32ed 100644 --- a/sway-core/src/semantic_analysis/syntax_tree.rs +++ b/sway-core/src/semantic_analysis/syntax_tree.rs @@ -15,7 +15,6 @@ use crate::{ type_engine::*, AstNode, ParseTree, }; - use sway_types::{ident::Ident, span::Span}; /// Represents the different variants of the AST. diff --git a/test/src/e2e_vm_tests/harness.rs b/test/src/e2e_vm_tests/harness.rs index 5dbb56a8f77..364a448efd7 100644 --- a/test/src/e2e_vm_tests/harness.rs +++ b/test/src/e2e_vm_tests/harness.rs @@ -121,7 +121,7 @@ pub(crate) fn compile_to_bytes(file_name: &str) -> Result> { } pub(crate) fn test_json_abi(file_name: &str) -> Result<()> { - let _script = compile_to_json_abi(file_name)?; + let _compiled_res = compile_to_json_abi(file_name)?; let manifest_dir = env!("CARGO_MANIFEST_DIR"); let oracle_path = format!( "{}/src/e2e_vm_tests/test_programs/{}/{}", diff --git a/test/src/e2e_vm_tests/mod.rs b/test/src/e2e_vm_tests/mod.rs index 1f854fecb7e..fecfa047b83 100644 --- a/test/src/e2e_vm_tests/mod.rs +++ b/test/src/e2e_vm_tests/mod.rs @@ -9,9 +9,10 @@ pub fn run(filter_regex: Option) { .unwrap_or(true) }; - // programs that should successfully compile and terminate - // with some known state - let positive_project_names = vec![ + // Non-contract programs that should successfully compile and terminate + // with some known state. Note that if you are adding a contract, it may pass by mistake. + // Please add contracts to `positive_project_names_with_abi`. + let positive_project_names_no_abi = vec![ ( "should_pass/forc/dependency_package_field", ProgramState::Return(0), @@ -22,13 +23,7 @@ pub fn run(filter_regex: Option) { ), ( "should_pass/language/basic_func_decl", - ProgramState::Return(1), - ), // 1 == true - // contracts revert because this test runs them against the VM - // and no selectors will match - ( - "should_pass/test_contracts/contract_abi_impl", - ProgramState::Revert(0), + ProgramState::Return(1), // 1 == true ), ("should_pass/language/dependencies", ProgramState::Return(0)), // 0 == false ( @@ -57,12 +52,12 @@ pub fn run(filter_regex: Option) { ), ( "should_pass/language/unary_not_basic", - ProgramState::Return(1), - ), // 1 == true + ProgramState::Return(1), // 1 == true + ), ( "should_pass/language/unary_not_basic_2", - ProgramState::Return(1), - ), // 1 == true + ProgramState::Return(1), // 1 == true + ), ( "should_pass/language/fix_opcode_bug", ProgramState::Return(30), @@ -103,52 +98,52 @@ pub fn run(filter_regex: Option) { ("should_pass/language/eq_4_test", ProgramState::Return(1)), ( "should_pass/language/local_impl_for_ord", - ProgramState::Return(1), - ), // true + ProgramState::Return(1), // true + ), ("should_pass/language/const_decl", ProgramState::Return(100)), ( "should_pass/language/const_decl_in_library", - ProgramState::Return(1), - ), // true + ProgramState::Return(1), // true + ), ( "should_pass/language/aliased_imports", ProgramState::Return(42), ), ( "should_pass/language/empty_method_initializer", - ProgramState::Return(1), - ), // true + ProgramState::Return(1), // true + ), ( "should_pass/stdlib/b512_struct_alignment", - ProgramState::Return(1), - ), // true + ProgramState::Return(1), // true + ), ("should_pass/stdlib/ge_test", ProgramState::Return(1)), // true ( "should_pass/language/generic_structs", - ProgramState::Return(1), - ), // true + ProgramState::Return(1), // true + ), ( "should_pass/language/generic_functions", - ProgramState::Return(1), - ), // true + ProgramState::Return(1), // true + ), ("should_pass/language/generic_enum", ProgramState::Return(1)), // true ( "should_pass/language/import_method_from_other_file", - ProgramState::Return(10), - ), // true + ProgramState::Return(10), // true + ), ( "should_pass/stdlib/ec_recover_test", - ProgramState::Return(1), - ), // true + ProgramState::Return(1), // true + ), ("should_pass/stdlib/address_test", ProgramState::Return(1)), // true ( "should_pass/language/generic_struct", - ProgramState::Return(1), - ), // true + ProgramState::Return(1), // true + ), ( "should_pass/language/zero_field_types", - ProgramState::Return(10), - ), // true + ProgramState::Return(10), // true + ), ("should_pass/stdlib/assert_test", ProgramState::Return(1)), // true ( "should_pass/language/match_expressions", @@ -162,18 +157,14 @@ pub fn run(filter_regex: Option) { ), ( "should_pass/language/array_generics", - ProgramState::Return(1), - ), // true + ProgramState::Return(1), // true + ), ( "should_pass/language/match_expressions_structs", ProgramState::Return(4), ), ("should_pass/stdlib/b512_test", ProgramState::Return(1)), // true ("should_pass/stdlib/block_height", ProgramState::Return(1)), // true - ( - "should_pass/language/valid_impurity", - ProgramState::Revert(0), - ), // false ( "should_pass/language/trait_override_bug", ProgramState::Return(7), @@ -184,8 +175,8 @@ pub fn run(filter_regex: Option) { ), ( "should_pass/language/modulo_uint_test", - ProgramState::Return(1), - ), // true + ProgramState::Return(1), // true + ), ( "should_pass/language/trait_import_with_star", ProgramState::Return(0), @@ -196,8 +187,8 @@ pub fn run(filter_regex: Option) { ), ( "should_pass/language/multi_item_import", - ProgramState::Return(0), - ), // false + ProgramState::Return(0), // false + ), ( "should_pass/language/use_full_path_names", ProgramState::Return(1), @@ -212,8 +203,8 @@ pub fn run(filter_regex: Option) { ), ( "should_pass/language/funcs_with_generic_types", - ProgramState::Return(1), - ), // true + ProgramState::Return(1), // true + ), ( "should_pass/language/enum_if_let", ProgramState::Return(143), @@ -234,12 +225,12 @@ pub fn run(filter_regex: Option) { ("should_pass/language/supertraits", ProgramState::Return(1)), ( "should_pass/language/new_allocator_test", - ProgramState::Return(42), - ), // true + ProgramState::Return(42), // true + ), ( "should_pass/language/chained_if_let", - ProgramState::Return(5), - ), // true + ProgramState::Return(5), // true + ), ( "should_pass/language/inline_if_expr_const", ProgramState::Return(0), @@ -292,20 +283,48 @@ pub fn run(filter_regex: Option) { ), ]; - let mut number_of_tests_run = positive_project_names.iter().fold(0, |acc, (name, res)| { - if filter(name) { - assert_eq!(crate::e2e_vm_tests::harness::runs_in_vm(name), *res); - // cannot use partial eq on type `anyhow::Error` so I've used `matches!` here instead. - // https://users.rust-lang.org/t/issues-in-asserting-result/61198/3 for reference. - assert!(matches!( - crate::e2e_vm_tests::harness::test_json_abi(name), - Ok(()) - )); - acc + 1 - } else { - acc - } - }); + let mut number_of_tests_run = + positive_project_names_no_abi + .iter() + .fold(0, |acc, (name, res)| { + if filter(name) { + assert_eq!(crate::e2e_vm_tests::harness::runs_in_vm(name), *res); + acc + 1 + } else { + acc + } + }); + + // Programs that should successfully compile, include abi and terminate + // with some known state. Note that if a non-contract is included + // it will be rejected during assertion. Please move it to + // `positive_project_names_no_abi` above. + let positive_project_names_with_abi = vec![ + // contracts revert because this test runs them against the VM + // and no selectors will match + ( + "should_pass/test_contracts/contract_abi_impl", + ProgramState::Revert(0), + ), + ( + "should_pass/language/valid_impurity", + ProgramState::Revert(0), // false + ), + ]; + + number_of_tests_run += positive_project_names_with_abi + .iter() + .fold(0, |acc, (name, res)| { + if filter(name) { + assert_eq!(crate::e2e_vm_tests::harness::runs_in_vm(name), *res); + // cannot use partial eq on type `anyhow::Error` so I've used `matches!` here instead. + // https://users.rust-lang.org/t/issues-in-asserting-result/61198/3 for reference. + assert!(crate::e2e_vm_tests::harness::test_json_abi(name).is_ok()); + acc + 1 + } else { + acc + } + }); // source code that should _not_ compile let negative_project_names = vec![ @@ -398,7 +417,8 @@ pub fn run(filter_regex: Option) { ),*/ ]; - let total_number_of_tests = positive_project_names.len() + let total_number_of_tests = positive_project_names_no_abi.len() + + positive_project_names_with_abi.len() + negative_project_names.len() + contract_and_project_names.len(); diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/forc/dependency_package_field/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/forc/dependency_package_field/json_abi_oracle.json deleted file mode 100644 index 0637a088a01..00000000000 --- a/test/src/e2e_vm_tests/test_programs/should_pass/forc/dependency_package_field/json_abi_oracle.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/abort_control_flow/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/abort_control_flow/json_abi_oracle.json deleted file mode 100644 index 0637a088a01..00000000000 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/abort_control_flow/json_abi_oracle.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/aliased_imports/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/aliased_imports/json_abi_oracle.json deleted file mode 100644 index 0637a088a01..00000000000 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/aliased_imports/json_abi_oracle.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/array_basics/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/array_basics/json_abi_oracle.json deleted file mode 100644 index 0637a088a01..00000000000 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/array_basics/json_abi_oracle.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/array_generics/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/array_generics/json_abi_oracle.json deleted file mode 100644 index 0637a088a01..00000000000 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/array_generics/json_abi_oracle.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/asm_expr_basic/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/asm_expr_basic/json_abi_oracle.json deleted file mode 100644 index 0637a088a01..00000000000 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/asm_expr_basic/json_abi_oracle.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/asm_without_return/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/asm_without_return/json_abi_oracle.json deleted file mode 100644 index 0637a088a01..00000000000 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/asm_without_return/json_abi_oracle.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/b256_bad_jumps/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/b256_bad_jumps/json_abi_oracle.json deleted file mode 100644 index 0637a088a01..00000000000 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/b256_bad_jumps/json_abi_oracle.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/b256_ops/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/b256_ops/json_abi_oracle.json deleted file mode 100644 index 0637a088a01..00000000000 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/b256_ops/json_abi_oracle.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/basic_func_decl/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/basic_func_decl/json_abi_oracle.json deleted file mode 100644 index 0637a088a01..00000000000 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/basic_func_decl/json_abi_oracle.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/bool_and_or/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/bool_and_or/json_abi_oracle.json deleted file mode 100644 index 0637a088a01..00000000000 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/bool_and_or/json_abi_oracle.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/chained_if_let/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/chained_if_let/json_abi_oracle.json deleted file mode 100644 index 0637a088a01..00000000000 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/chained_if_let/json_abi_oracle.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/const_decl/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/const_decl/json_abi_oracle.json deleted file mode 100644 index 0637a088a01..00000000000 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/const_decl/json_abi_oracle.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/const_decl_in_library/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/const_decl_in_library/json_abi_oracle.json deleted file mode 100644 index 0637a088a01..00000000000 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/const_decl_in_library/json_abi_oracle.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/dependencies/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/dependencies/json_abi_oracle.json deleted file mode 100644 index 0637a088a01..00000000000 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/dependencies/json_abi_oracle.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/empty_method_initializer/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/empty_method_initializer/json_abi_oracle.json deleted file mode 100644 index 0637a088a01..00000000000 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/empty_method_initializer/json_abi_oracle.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/enum_destructuring/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/enum_destructuring/json_abi_oracle.json deleted file mode 100644 index 0637a088a01..00000000000 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/enum_destructuring/json_abi_oracle.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/enum_if_let/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/enum_if_let/json_abi_oracle.json deleted file mode 100644 index 0637a088a01..00000000000 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/enum_if_let/json_abi_oracle.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/enum_if_let_large_type/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/enum_if_let_large_type/json_abi_oracle.json deleted file mode 100644 index 0637a088a01..00000000000 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/enum_if_let_large_type/json_abi_oracle.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/enum_in_fn_decl/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/enum_in_fn_decl/json_abi_oracle.json deleted file mode 100644 index 0637a088a01..00000000000 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/enum_in_fn_decl/json_abi_oracle.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/enum_init_fn_call/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/enum_init_fn_call/json_abi_oracle.json deleted file mode 100644 index 0637a088a01..00000000000 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/enum_init_fn_call/json_abi_oracle.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/enum_type_inference/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/enum_type_inference/json_abi_oracle.json deleted file mode 100644 index 0637a088a01..00000000000 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/enum_type_inference/json_abi_oracle.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/eq_4_test/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/eq_4_test/json_abi_oracle.json deleted file mode 100644 index 0637a088a01..00000000000 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/eq_4_test/json_abi_oracle.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/fix_opcode_bug/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/fix_opcode_bug/json_abi_oracle.json deleted file mode 100644 index 0637a088a01..00000000000 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/fix_opcode_bug/json_abi_oracle.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/funcs_with_generic_types/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/funcs_with_generic_types/json_abi_oracle.json deleted file mode 100644 index 0637a088a01..00000000000 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/funcs_with_generic_types/json_abi_oracle.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/generic_enum/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/generic_enum/json_abi_oracle.json deleted file mode 100644 index 0637a088a01..00000000000 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/generic_enum/json_abi_oracle.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/generic_functions/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/generic_functions/json_abi_oracle.json deleted file mode 100644 index 0637a088a01..00000000000 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/generic_functions/json_abi_oracle.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/generic_impl_self/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/generic_impl_self/json_abi_oracle.json deleted file mode 100644 index 0637a088a01..00000000000 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/generic_impl_self/json_abi_oracle.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/generic_struct/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/generic_struct/json_abi_oracle.json deleted file mode 100644 index 0637a088a01..00000000000 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/generic_struct/json_abi_oracle.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/generic_structs/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/generic_structs/json_abi_oracle.json deleted file mode 100644 index 0637a088a01..00000000000 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/generic_structs/json_abi_oracle.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/if_elseif_enum/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/if_elseif_enum/json_abi_oracle.json deleted file mode 100644 index 0637a088a01..00000000000 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/if_elseif_enum/json_abi_oracle.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/if_implicit_unit/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/if_implicit_unit/json_abi_oracle.json deleted file mode 100644 index 0637a088a01..00000000000 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/if_implicit_unit/json_abi_oracle.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/import_method_from_other_file/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/import_method_from_other_file/json_abi_oracle.json deleted file mode 100644 index 0637a088a01..00000000000 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/import_method_from_other_file/json_abi_oracle.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/inline_if_expr_const/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/inline_if_expr_const/json_abi_oracle.json deleted file mode 100644 index 0637a088a01..00000000000 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/inline_if_expr_const/json_abi_oracle.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/is_prime/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/is_prime/json_abi_oracle.json deleted file mode 100644 index 0637a088a01..00000000000 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/is_prime/json_abi_oracle.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/local_impl_for_ord/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/local_impl_for_ord/json_abi_oracle.json deleted file mode 100644 index 0637a088a01..00000000000 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/local_impl_for_ord/json_abi_oracle.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/main_returns_unit/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/main_returns_unit/json_abi_oracle.json deleted file mode 100644 index 0637a088a01..00000000000 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/main_returns_unit/json_abi_oracle.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/match_expressions/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/match_expressions/json_abi_oracle.json deleted file mode 100644 index 0637a088a01..00000000000 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/match_expressions/json_abi_oracle.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/match_expressions_structs/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/match_expressions_structs/json_abi_oracle.json deleted file mode 100644 index 0637a088a01..00000000000 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/match_expressions_structs/json_abi_oracle.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/method_on_empty_struct/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/method_on_empty_struct/json_abi_oracle.json deleted file mode 100644 index 0637a088a01..00000000000 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/method_on_empty_struct/json_abi_oracle.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/modulo_uint_test/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/modulo_uint_test/json_abi_oracle.json deleted file mode 100644 index 0637a088a01..00000000000 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/modulo_uint_test/json_abi_oracle.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/multi_item_import/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/multi_item_import/json_abi_oracle.json deleted file mode 100644 index 0637a088a01..00000000000 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/multi_item_import/json_abi_oracle.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/neq_4_test/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/neq_4_test/json_abi_oracle.json deleted file mode 100644 index 0637a088a01..00000000000 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/neq_4_test/json_abi_oracle.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/nested_structs/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/nested_structs/json_abi_oracle.json deleted file mode 100644 index 0637a088a01..00000000000 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/nested_structs/json_abi_oracle.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/nested_while_and_if/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/nested_while_and_if/json_abi_oracle.json deleted file mode 100644 index 0637a088a01..00000000000 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/nested_while_and_if/json_abi_oracle.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/new_allocator_test/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/new_allocator_test/json_abi_oracle.json deleted file mode 100644 index 0637a088a01..00000000000 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/new_allocator_test/json_abi_oracle.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/op_precedence/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/op_precedence/json_abi_oracle.json deleted file mode 100644 index 0637a088a01..00000000000 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/op_precedence/json_abi_oracle.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/out_of_order_decl/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/out_of_order_decl/json_abi_oracle.json deleted file mode 100644 index 0637a088a01..00000000000 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/out_of_order_decl/json_abi_oracle.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/retd_b256/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/retd_b256/json_abi_oracle.json deleted file mode 100644 index 0637a088a01..00000000000 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/retd_b256/json_abi_oracle.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/retd_small_array/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/retd_small_array/json_abi_oracle.json deleted file mode 100644 index 0637a088a01..00000000000 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/retd_small_array/json_abi_oracle.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/retd_struct/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/retd_struct/json_abi_oracle.json deleted file mode 100644 index 0637a088a01..00000000000 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/retd_struct/json_abi_oracle.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/retd_zero_len_array/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/retd_zero_len_array/json_abi_oracle.json deleted file mode 100644 index 0637a088a01..00000000000 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/retd_zero_len_array/json_abi_oracle.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/size_of/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/size_of/json_abi_oracle.json deleted file mode 100644 index 0637a088a01..00000000000 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/size_of/json_abi_oracle.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/struct_field_access/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/struct_field_access/json_abi_oracle.json deleted file mode 100644 index 0637a088a01..00000000000 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/struct_field_access/json_abi_oracle.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/struct_field_reassignment/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/struct_field_reassignment/json_abi_oracle.json deleted file mode 100644 index 0637a088a01..00000000000 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/struct_field_reassignment/json_abi_oracle.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/supertraits/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/supertraits/json_abi_oracle.json deleted file mode 100644 index 0637a088a01..00000000000 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/supertraits/json_abi_oracle.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/trait_import_with_star/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/trait_import_with_star/json_abi_oracle.json deleted file mode 100644 index 0637a088a01..00000000000 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/trait_import_with_star/json_abi_oracle.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/trait_override_bug/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/trait_override_bug/json_abi_oracle.json deleted file mode 100644 index 0637a088a01..00000000000 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/trait_override_bug/json_abi_oracle.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/tuple_access/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/tuple_access/json_abi_oracle.json deleted file mode 100644 index 0637a088a01..00000000000 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/tuple_access/json_abi_oracle.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/tuple_desugaring/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/tuple_desugaring/json_abi_oracle.json deleted file mode 100644 index 0637a088a01..00000000000 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/tuple_desugaring/json_abi_oracle.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/tuple_in_struct/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/tuple_in_struct/json_abi_oracle.json deleted file mode 100644 index 0637a088a01..00000000000 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/tuple_in_struct/json_abi_oracle.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/tuple_indexing/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/tuple_indexing/json_abi_oracle.json deleted file mode 100644 index 0637a088a01..00000000000 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/tuple_indexing/json_abi_oracle.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/tuple_types/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/tuple_types/json_abi_oracle.json deleted file mode 100644 index 0637a088a01..00000000000 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/tuple_types/json_abi_oracle.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/unary_not_basic/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/unary_not_basic/json_abi_oracle.json deleted file mode 100644 index 0637a088a01..00000000000 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/unary_not_basic/json_abi_oracle.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/unary_not_basic_2/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/unary_not_basic_2/json_abi_oracle.json deleted file mode 100644 index 0637a088a01..00000000000 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/unary_not_basic_2/json_abi_oracle.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/use_full_path_names/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/use_full_path_names/json_abi_oracle.json deleted file mode 100644 index 0637a088a01..00000000000 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/use_full_path_names/json_abi_oracle.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/while_loops/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/while_loops/json_abi_oracle.json deleted file mode 100644 index 0637a088a01..00000000000 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/while_loops/json_abi_oracle.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/zero_field_types/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/zero_field_types/json_abi_oracle.json deleted file mode 100644 index 0637a088a01..00000000000 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/zero_field_types/json_abi_oracle.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/address_test/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/address_test/json_abi_oracle.json deleted file mode 100644 index 0637a088a01..00000000000 --- a/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/address_test/json_abi_oracle.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/assert_test/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/assert_test/json_abi_oracle.json deleted file mode 100644 index 0637a088a01..00000000000 --- a/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/assert_test/json_abi_oracle.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/b512_struct_alignment/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/b512_struct_alignment/json_abi_oracle.json deleted file mode 100644 index 0637a088a01..00000000000 --- a/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/b512_struct_alignment/json_abi_oracle.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/b512_test/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/b512_test/json_abi_oracle.json deleted file mode 100644 index 0637a088a01..00000000000 --- a/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/b512_test/json_abi_oracle.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/block_height/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/block_height/json_abi_oracle.json deleted file mode 100644 index 0637a088a01..00000000000 --- a/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/block_height/json_abi_oracle.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/ec_recover_test/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/ec_recover_test/json_abi_oracle.json deleted file mode 100644 index 0637a088a01..00000000000 --- a/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/ec_recover_test/json_abi_oracle.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/ge_test/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/ge_test/json_abi_oracle.json deleted file mode 100644 index 0637a088a01..00000000000 --- a/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/ge_test/json_abi_oracle.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file