浏览代码

Merge pull request #100 from Freax13/amlcontext-test-send-sync

Add test to verify that AmlContext implements Send and Sync
Isaac Woods 3 年之前
父节点
当前提交
d8ce7f4375
共有 1 个文件被更改,包括 12 次插入0 次删除
  1. 12 0
      aml/src/lib.rs

+ 12 - 0
aml/src/lib.rs

@@ -791,3 +791,15 @@ pub enum AmlError {
     FieldInvalidAccessSize,
     TypeCannotBeCompared(AmlType),
 }
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+
+    #[test]
+    fn test_send_sync() {
+        // verify that AmlContext implements Send and Sync
+        fn test_send_sync<T: Send + Sync>() {}
+        test_send_sync::<AmlContext>();
+    }
+}