feat: add c
This commit is contained in:
22
__ffi/c/src/main.rs
Normal file
22
__ffi/c/src/main.rs
Normal file
@@ -0,0 +1,22 @@
|
||||
use inline_c::assert_c;
|
||||
|
||||
fn main() {
|
||||
println!("Hello, world!");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_stdout() {
|
||||
(assert_c! {
|
||||
#include <stdio.h>
|
||||
|
||||
int main() {
|
||||
printf("Hello, World!");
|
||||
|
||||
return 0;
|
||||
}
|
||||
})
|
||||
.success()
|
||||
.stdout("Hello, World!");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user