mirror of
https://github.com/fluencelabs/marine-rs-sdk
synced 2025-03-15 14:30:48 +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 build -v --target wasm32-wasi --all-features)
|
||||||
(cd fluence; cargo clippy -v --target wasm32-wasi)
|
(cd fluence; cargo clippy -v --target wasm32-wasi)
|
||||||
(cd fluence-test; cargo build)
|
(cd fluence-test; cargo build)
|
||||||
|
(cd crates/wit; cargo test)
|
||||||
|
|
||||||
TARGET=wasm32-wasi cargo test -v --all-features
|
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
|
--> $DIR/array_inner_refs.rs:13:23
|
||||||
|
|
|
|
||||||
13 | pub fn inner_arrays_1(_arg: Vec<&Vec<Vec<Vec<u8>>>>) -> Vec<Vec<Vec<Vec<u8>>>> {
|
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
|
--> $DIR/array_inner_refs.rs:18:23
|
||||||
|
|
|
|
||||||
18 | pub fn inner_arrays_2(_arg: Vec<Vec<&Vec<Vec<u8>>>>) -> Vec<Vec<Vec<Vec<u8>>>> {
|
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
|
--> $DIR/array_inner_refs.rs:23:23
|
||||||
|
|
|
|
||||||
23 | pub fn inner_arrays_3(_arg: Vec<Vec<Vec<&Vec<u8>>>>) -> Vec<Vec<Vec<Vec<u8>>>> {
|
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
|
--> $DIR/array_inner_refs.rs:28:23
|
||||||
|
|
|
|
||||||
28 | pub fn inner_arrays_4(_arg: Vec<Vec<Vec<Vec<&u8>>>>) -> Vec<Vec<Vec<Vec<u8>>>> {
|
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
|
--> $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>>>> {
|
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!()
|
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]
|
#[fce]
|
||||||
#[derive(Default)]
|
#[derive(Default)]
|
||||||
pub struct TestRecord {
|
pub struct TestRecord {
|
||||||
|
@ -4,6 +4,7 @@ fn fce_compilation_tests() {
|
|||||||
tests.compile_fail("tests/compilation_tests/export_functions/array_inner_refs.rs");
|
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/arrays.rs");
|
||||||
tests.pass("tests/compilation_tests/export_functions/ref_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/basic_types.rs");
|
||||||
tests.pass("tests/compilation_tests/export_functions/ref_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");
|
tests.compile_fail("tests/compilation_tests/export_functions/improper_types.rs");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user