mirror of
https://github.com/fluencelabs/marine-rs-sdk-test
synced 2024-12-04 15:20:18 +00:00
fix tests
This commit is contained in:
parent
3f93e75c10
commit
9f8d558f46
@ -23,6 +23,7 @@ jobs:
|
||||
(cd fluence; cargo build -v --target wasm32-wasi --all-features)
|
||||
(cd fluence; cargo clippy -v --target wasm32-wasi)
|
||||
(cd fluence-test; cargo build)
|
||||
(cd crates/wit; cargo test)
|
||||
|
||||
TARGET=wasm32-wasi cargo test -v --all-features
|
||||
|
||||
|
@ -1,28 +1,28 @@
|
||||
error: vector type in export functions should take arguments only by value
|
||||
error: a vector type in arguments of export functions shouldn't contain references
|
||||
--> $DIR/array_inner_refs.rs:13:23
|
||||
|
|
||||
13 | pub fn inner_arrays_1(_arg: Vec<&Vec<Vec<Vec<u8>>>>) -> Vec<Vec<Vec<Vec<u8>>>> {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: vector type in export functions should take arguments only by value
|
||||
error: a vector type in arguments of export functions shouldn't contain references
|
||||
--> $DIR/array_inner_refs.rs:18:23
|
||||
|
|
||||
18 | pub fn inner_arrays_2(_arg: Vec<Vec<&Vec<Vec<u8>>>>) -> Vec<Vec<Vec<Vec<u8>>>> {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: vector type in export functions should take arguments only by value
|
||||
error: a vector type in arguments of export functions shouldn't contain references
|
||||
--> $DIR/array_inner_refs.rs:23:23
|
||||
|
|
||||
23 | pub fn inner_arrays_3(_arg: Vec<Vec<Vec<&Vec<u8>>>>) -> Vec<Vec<Vec<Vec<u8>>>> {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: vector type in export functions should take arguments only by value
|
||||
error: a vector type in arguments of export functions shouldn't contain references
|
||||
--> $DIR/array_inner_refs.rs:28:23
|
||||
|
|
||||
28 | pub fn inner_arrays_4(_arg: Vec<Vec<Vec<Vec<&u8>>>>) -> Vec<Vec<Vec<Vec<u8>>>> {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: vector type in export functions should take arguments only by value
|
||||
error: a vector type in arguments of export functions shouldn't contain references
|
||||
--> $DIR/array_inner_refs.rs:33:35
|
||||
|
|
||||
33 | pub fn inner_arrays_5(_arg1: i32, _arg2: Vec<Vec<Vec<&Vec<u8>>>>, _arg3: i32) -> Vec<Vec<Vec<Vec<u8>>>> {
|
||||
|
@ -0,0 +1,11 @@
|
||||
#![allow(improper_ctypes)]
|
||||
|
||||
#[fce]
|
||||
pub fn inner_arrays_2(_arg: &Vec<Vec<Vec<Vec<u8>>>>) -> &Vec<Vec<&Vec<Vec<u8>>>> {
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
#[fce]
|
||||
pub fn inner_arrays_3(_arg: &Vec<Vec<Vec<Vec<u8>>>>) -> &Vec<&Vec<&Vec<&Vec<&u8>>>> {
|
||||
unimplemented!()
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
error: cannot find attribute `fce` in this scope
|
||||
--> $DIR/inner_vec_refs.rs:8:3
|
||||
|
|
||||
8 | #[fce]
|
||||
| ^^^
|
||||
|
||||
error: cannot find attribute `fce` in this scope
|
||||
--> $DIR/inner_vec_refs.rs:3:3
|
||||
|
|
||||
3 | #[fce]
|
||||
| ^^^
|
||||
|
||||
error[E0601]: `main` function not found in crate `$CRATE`
|
||||
--> $DIR/inner_vec_refs.rs:1:1
|
||||
|
|
||||
1 | / #![allow(improper_ctypes)]
|
||||
2 | |
|
||||
3 | | #[fce]
|
||||
4 | | pub fn inner_arrays_2(_arg: &Vec<Vec<Vec<Vec<u8>>>>) -> &Vec<Vec<&Vec<Vec<u8>>>> {
|
||||
... |
|
||||
10 | | unimplemented!()
|
||||
11 | | }
|
||||
| |_^ consider adding a `main` function to `$DIR/tests/compilation_tests/export_functions/inner_vec_refs.rs`
|
@ -14,16 +14,6 @@ pub fn inner_arrays_1(_arg: &Vec<Vec<Vec<Vec<u8>>>>) -> &Vec<Vec<Vec<Vec<u8>>>>
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
#[fce]
|
||||
pub fn inner_arrays_2(_arg: &Vec<Vec<Vec<Vec<u8>>>>) -> &Vec<Vec<&Vec<Vec<u8>>>> {
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
#[fce]
|
||||
pub fn inner_arrays_3(_arg: &Vec<Vec<Vec<Vec<u8>>>>) -> &Vec<&Vec<&Vec<&Vec<&u8>>>> {
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
#[fce]
|
||||
#[derive(Default)]
|
||||
pub struct TestRecord {
|
||||
|
@ -4,6 +4,7 @@ fn fce_compilation_tests() {
|
||||
tests.compile_fail("tests/compilation_tests/export_functions/array_inner_refs.rs");
|
||||
tests.pass("tests/compilation_tests/export_functions/arrays.rs");
|
||||
tests.pass("tests/compilation_tests/export_functions/ref_arrays.rs");
|
||||
tests.compile_fail("tests/compilation_tests/export_functions/inner_vec_refs.rs");
|
||||
tests.pass("tests/compilation_tests/export_functions/basic_types.rs");
|
||||
tests.pass("tests/compilation_tests/export_functions/ref_basic_types.rs");
|
||||
tests.compile_fail("tests/compilation_tests/export_functions/improper_types.rs");
|
||||
|
Loading…
Reference in New Issue
Block a user