mirror of
https://github.com/icewind1991/ivory.git
synced 2026-06-04 03:04:08 +02:00
integration tests for return types
This commit is contained in:
parent
db1ce0dcd4
commit
bbc0c97025
2 changed files with 62 additions and 0 deletions
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue