35 lines
666 B
Rust
35 lines
666 B
Rust
#![allow(non_upper_case_globals)]
|
|
#![allow(non_camel_case_types)]
|
|
#![allow(non_snake_case)]
|
|
|
|
|
|
/*
|
|
* Pull our wacky rsyslog.h generated bindings
|
|
*/
|
|
include!(concat!(env!("OUT_DIR"), "/bindings.rs"));
|
|
|
|
|
|
fn modGetType(m: &mut eModType_t) -> rsRetVal {
|
|
// Set ourselves up as an input module
|
|
*m = 0;
|
|
return 0; // ok
|
|
}
|
|
|
|
#[cfg(test)]
|
|
mod tests {
|
|
use super::*;
|
|
|
|
/**
|
|
* Verify that the modGetType function works properly
|
|
*/
|
|
#[test]
|
|
fn test_modGetType() {
|
|
/*
|
|
* Setting this to some garbage value
|
|
*/
|
|
let mut m: eModType_t = 2;
|
|
assert_eq!(0, modGetType(&mut m));
|
|
assert_eq!(0, m);
|
|
}
|
|
}
|