Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 162975dd authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 7286185 from c41a12fd to sc-d1-release

Change-Id: I9da06a1d65ea518a84f6e34caf58d5200e5e965c
parents 11a82bd0 c41a12fd
Loading
Loading
Loading
Loading
+22 −0
Original line number Diff line number Diff line
@@ -362,3 +362,25 @@ cc_test {
    ],
    min_sdk_version: "29",
}

rust_test {
    name: "doh_unit_test",
    enabled: support_rust_toolchain,
    crate_name: "doh",
    srcs: ["doh.rs"],
    edition: "2018",
    test_suites: ["general-tests"],
    auto_gen_config: true,
    rustlibs: [
        "libandroid_logger",
        "libanyhow",
        "liblazy_static",
        "liblibc",
        "liblog_rust",
        "libquiche",
        "libring",
        "libtokio",
        "liburl",
    ],
    min_sdk_version: "29",
}
+11 −0
Original line number Diff line number Diff line
@@ -472,3 +472,14 @@ pub unsafe extern "C" fn doh_query(
        }
    }
}

#[cfg(test)]
mod tests {
    #[test]
    fn doh_init() {
        unsafe {
            // Safety: the returned pointer from doh_init() must be a null terminated string.
            assert_eq!(std::ffi::CStr::from_ptr(super::doh_init()).to_str().unwrap(), "1.0");
        }
    }
}