Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,13 @@
|
|||
extern crate libc;
|
||||
|
||||
//c function that returns the sum of two integers
|
||||
extern {
|
||||
fn add_input(in1: libc::c_int, in2: libc::c_int) -> libc::c_int;
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let (in1, in2) = (5, 4);
|
||||
let output = unsafe {
|
||||
add_input(in1, in2) };
|
||||
assert!( (output == (in1 + in2) ),"Error in sum calculation") ;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue