1 // Copyright 2024 The Chromium Authors 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 mod c_ffi { 6 #![allow(dead_code)] 7 #![allow(non_snake_case)] 8 #![allow(non_camel_case_types)] 9 #![allow(non_upper_case_globals)] 10 include!(env!("BINDGEN_RS_FILE")); 11 } 12 mul_three_numbers_in_c(a: u32, b: u32, c: u32) -> u3213pub fn mul_three_numbers_in_c(a: u32, b: u32, c: u32) -> u32 { 14 unsafe { c_ffi::mul_three_numbers(a, b, c) } 15 } 16 17 #[cfg(test)] 18 mod tests { 19 use super::*; 20 21 #[test] test_mul_three_numbers()22 fn test_mul_three_numbers() { 23 assert_eq!(mul_three_numbers_in_c(5, 10, 15), 750); 24 } 25 } 26