|
| 1 | +use crate::e2e::common::runner::setup_package; |
| 2 | +use indoc::indoc; |
| 3 | +use shared::test_utils::output_assert::assert_stdout_contains; |
| 4 | +use snapbox::cmd::Command as SnapboxCommand; |
| 5 | + |
| 6 | +#[test] |
| 7 | +fn simple_package() { |
| 8 | + let temp = setup_package("plugin_diagnostics"); |
| 9 | + let output = SnapboxCommand::new("scarb") |
| 10 | + .current_dir(&temp) |
| 11 | + .args(["build", "--test"]) |
| 12 | + .assert() |
| 13 | + .failure(); |
| 14 | + |
| 15 | + assert_stdout_contains( |
| 16 | + output, |
| 17 | + indoc! {r#" |
| 18 | + error: Missing token ';'. |
| 19 | + --> [..]/tests/contract.cairo:14:69 |
| 20 | + let (contract_address, _) = contract.deploy(constructor_calldata),unwrap(); |
| 21 | + ^ |
| 22 | + note: this error originates in the attribute macro: `test` |
| 23 | + note: this error originates in the attribute macro: `fuzzer` |
| 24 | + note: this error originates in the attribute macro: `__fuzzer_config` |
| 25 | + note: this error originates in the attribute macro: `__fuzzer_wrapper` |
| 26 | + note: this error originates in the attribute macro: `fork` |
| 27 | + note: this error originates in the attribute macro: `ignore` |
| 28 | + note: this error originates in the attribute macro: `__internal_config_statement` |
| 29 | +
|
| 30 | + error: Skipped tokens. Expected: statement. |
| 31 | + --> [..]/tests/contract.cairo:14:70 |
| 32 | + let (contract_address, _) = contract.deploy(constructor_calldata),unwrap(); |
| 33 | + ^^^^^^^ |
| 34 | + note: this error originates in the attribute macro: `test` |
| 35 | + note: this error originates in the attribute macro: `fuzzer` |
| 36 | + note: this error originates in the attribute macro: `__fuzzer_config` |
| 37 | + note: this error originates in the attribute macro: `__fuzzer_wrapper` |
| 38 | + note: this error originates in the attribute macro: `fork` |
| 39 | + note: this error originates in the attribute macro: `ignore` |
| 40 | + note: this error originates in the attribute macro: `__internal_config_statement` |
| 41 | +
|
| 42 | + error: Unexpected type for tuple pattern. "core::result::Result::<(core::starknet::contract_address::ContractAddress, core::array::Span::<core::felt252>), core::array::Array::<core::felt252>>" is not a tuple. |
| 43 | + --> [..]/tests/contract.cairo:13:33-14:68 |
| 44 | + let constructor_calldata = @ArrayTrait::new(); |
| 45 | + _________________________________^ |
| 46 | + | let (contract_address, _) = contract.deploy(constructor_calldata),unwrap(); |
| 47 | + |____________________________________________________________________^ |
| 48 | + note: this error originates in the attribute macro: `test` |
| 49 | + note: this error originates in the attribute macro: `fuzzer` |
| 50 | + note: this error originates in the attribute macro: `__fuzzer_config` |
| 51 | + note: this error originates in the attribute macro: `__fuzzer_wrapper` |
| 52 | + note: this error originates in the attribute macro: `fork` |
| 53 | + note: this error originates in the attribute macro: `ignore` |
| 54 | + note: this error originates in the attribute macro: `__internal_config_statement` |
| 55 | +
|
| 56 | + error[E0006]: Function not found. |
| 57 | + --> [..]/tests/contract.cairo:14:70 |
| 58 | + let (contract_address, _) = contract.deploy(constructor_calldata),unwrap(); |
| 59 | + ^^^^^^^ |
| 60 | + note: this error originates in the attribute macro: `test` |
| 61 | + note: this error originates in the attribute macro: `fuzzer` |
| 62 | + note: this error originates in the attribute macro: `__fuzzer_config` |
| 63 | + note: this error originates in the attribute macro: `__fuzzer_wrapper` |
| 64 | + note: this error originates in the attribute macro: `fork` |
| 65 | + note: this error originates in the attribute macro: `ignore` |
| 66 | + note: this error originates in the attribute macro: `__internal_config_statement` |
| 67 | +
|
| 68 | + error: Variable "contract_address" not found. |
| 69 | + --> [..]/tests/contract.cairo:15:49 |
| 70 | + let dispatcher = IHelloStarknetDispatcher { contract_address }; |
| 71 | + ^^^^^^^^^^^^^^^^^ |
| 72 | + note: this error originates in the attribute macro: `test` |
| 73 | + note: this error originates in the attribute macro: `fuzzer` |
| 74 | + note: this error originates in the attribute macro: `__fuzzer_config` |
| 75 | + note: this error originates in the attribute macro: `__fuzzer_wrapper` |
| 76 | + note: this error originates in the attribute macro: `fork` |
| 77 | + note: this error originates in the attribute macro: `ignore` |
| 78 | + note: this error originates in the attribute macro: `__internal_config_statement` |
| 79 | +
|
| 80 | + error: could not compile `simple_package_integrationtest` due to previous error |
| 81 | + "#}, |
| 82 | + ); |
| 83 | +} |
0 commit comments