Kaynağa Gözat

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

Add test to verify that AmlContext implements Send and Sync
Isaac Woods 3 yıl önce
ebeveyn
işleme
d8ce7f4375
1 değiştirilmiş dosya ile 12 ekleme ve 0 silme
  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>();
+    }
+}