Skip to content

Commit

Permalink
Fix integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
shreyasm-dev committed Jul 26, 2023
1 parent 95d284b commit d4a10da
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "jnat"
version = "0.8.0"
version = "0.8.1"
edition = "2021"
license = "MIT"
description = "A wrapper around the jni crate"
Expand Down
4 changes: 2 additions & 2 deletions integration/tests/lib/hello.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ use jnat::{
Env,
};

jnat!(Hello, caller, (JNIEnv, JClass, JString) -> ());
jnat!(Hello, hello, (JNIEnv, JClass, JString) -> jstring);

fn hello(mut env: JNIEnv, _: JClass, name: JString) -> jstring {
let mut env = Env::new(&env);

let message: String = env.get_string(&name).expect("Failed to get name").into();
let message: String = env.get_string(name).expect("Failed to get name").into();
let message = format!("Hello, {}!", message);

let output = env.string(&message).unwrap();
Expand Down
2 changes: 1 addition & 1 deletion integration/tests/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pub mod call_method;
pub mod call_static_method;
// pub mod hello;
pub mod hello;

#[derive(Debug)]
pub struct IntegrationTest {
Expand Down

0 comments on commit d4a10da

Please sign in to comment.