From 6bff970d69480272102b3aba8c88e287fcebbcd5 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Sat, 7 Jul 2018 16:50:35 -0400 Subject: Add rust_test to gn build, with working example. --- src/handlers.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/handlers.rs b/src/handlers.rs index 64a076f11..405fe29da 100644 --- a/src/handlers.rs +++ b/src/handlers.rs @@ -10,6 +10,11 @@ fn string_from_ptr(ptr: *const c_char) -> String { String::from(cstr.to_str().unwrap()) } +#[test] +fn test_example() { + assert_eq!(2 + 2, 4); +} + #[no_mangle] pub extern "C" fn handle_code_fetch( module_specifier: *const c_char, -- cgit v1.2.3