浏览代码

skip panic tests when using an assert which aborts

Tommie Levy 6 年之前
父节点
当前提交
41d68fddf8
共有 2 个文件被更改,包括 3 次插入0 次删除
  1. 1 0
      src/block.rs
  2. 2 0
      src/fail.rs

+ 1 - 0
src/block.rs

@@ -365,6 +365,7 @@ mod test {
     }
 
     #[test]
+    #[cfg(not(feature="write"))]
     #[should_panic]
     fn test_oob() {
         let arr = b"lorem";

+ 2 - 0
src/fail.rs

@@ -89,6 +89,7 @@ mod test {
     use super::*;
 
     #[test]
+    #[cfg(not(feature="write"))]
     #[should_panic]
     fn test_panic_oom() {
         fn panic() -> ! {
@@ -101,6 +102,7 @@ mod test {
 
     #[test]
     #[should_panic]
+    #[cfg(not(feature="write"))]
     #[cfg(feature = "tls")]
     fn test_panic_thread_oom() {
         fn infinite() -> ! {