integration tests for return types

This commit is contained in:
Robin Appelman 2019-04-05 21:22:14 +02:00
commit bbc0c97025
2 changed files with 62 additions and 0 deletions

View file

@ -40,6 +40,32 @@ fn expect_bool(arg: bool) {
fn expect_option_bool(arg: Option<bool>) {
dump(arg);
}
#[ivory_export]
fn return_long() -> i64 {
1
}
#[ivory_export]
fn return_double() -> f64 {
0.5
}
#[ivory_export]
fn return_true() -> bool {
true
}
#[ivory_export]
fn return_false() -> bool {
false
}
#[ivory_export]
fn return_string() -> String {
"some string data".to_string()
}
ivory_module!({
name: "tests",
version: "0.0.1",