]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
Add USING_SYSTEM_TDB test for rust config
authorDavid Mulder <dmulder@samba.org>
Tue, 13 Aug 2024 20:06:00 +0000 (14:06 -0600)
committerDavid Mulder <dmulder@samba.org>
Wed, 23 Oct 2024 14:21:34 +0000 (14:21 +0000)
Signed-off-by: David Mulder <dmulder@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
rust/config/src/lib.rs

index be5724b695c8ba3681a6d64a1a09d7ccd24b0f43..2f1d2f84a4388e07782c85b75cd996e20417ace7 100644 (file)
 #![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
+        );
+    }
+}