From 7140c506eef619be03e66402697c6fb4b1583f3a Mon Sep 17 00:00:00 2001 From: David Mulder Date: Tue, 13 Aug 2024 14:06:00 -0600 Subject: [PATCH] Add USING_SYSTEM_TDB test for rust config Signed-off-by: David Mulder Reviewed-by: Alexander Bokovoy --- rust/config/src/lib.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/rust/config/src/lib.rs b/rust/config/src/lib.rs index be5724b695c..2f1d2f84a43 100644 --- a/rust/config/src/lib.rs +++ b/rust/config/src/lib.rs @@ -25,3 +25,19 @@ #![allow(dead_code)] #![allow(clippy::upper_case_acronyms)] include!(concat!(env!("OUT_DIR"), "/bindings.rs")); + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_using_system_tdb() { + // This test just ensures that USING_SYSTEM_TDB is available from the + // config. None of the other options are really used at the moment. + assert!( + USING_SYSTEM_TDB == 0 || USING_SYSTEM_TDB == 1, + "Unexpected value for USING_SYSTEM_TDB: {}", + USING_SYSTEM_TDB + ); + } +} -- 2.47.3