diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2018-07-07 16:50:35 -0400 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2018-07-07 17:24:46 -0400 |
commit | 6bff970d69480272102b3aba8c88e287fcebbcd5 (patch) | |
tree | 2a5b467bc6dba04a32244d265c96b7cce2f10d6a /src/handlers.rs | |
parent | a2dde56c5961f451b9042c1f651af372c4984034 (diff) |
Add rust_test to gn build, with working example.
Diffstat (limited to 'src/handlers.rs')
-rw-r--r-- | src/handlers.rs | 5 |
1 files changed, 5 insertions, 0 deletions
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, |