File: disable-tests-missing-testdata.diff

package info (click to toggle)
rust-png 0.17.16-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 948 kB
  • sloc: makefile: 2
file content (94 lines) | stat: -rw-r--r-- 2,999 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
--- a/src/decoder/mod.rs
+++ b/src/decoder/mod.rs
@@ -157,7 +157,7 @@
     ///
     /// Note that this is a best-effort basis.
     ///
-    /// ```
+    /// ```no_run
     /// use std::fs::File;
     /// use png::{Decoder, Limits};
     /// // This image is 32×32, 1bit per pixel. The reader buffers one row which requires 4 bytes.
--- a/src/decoder/stream.rs
+++ b/src/decoder/stream.rs
@@ -1841,7 +1841,6 @@
     use std::io::{ErrorKind, Read, Write};
     use std::rc::Rc;
 
-    #[test]
     fn image_gamma() -> Result<(), ()> {
         fn trial(path: &str, expected: Option<ScaledFloat>) {
             let decoder = crate::Decoder::new(File::open(path).unwrap());
@@ -1882,7 +1881,6 @@
         Ok(())
     }
 
-    #[test]
     fn image_source_chromaticities() -> Result<(), ()> {
         fn trial(path: &str, expected: Option<SourceChromaticities>) {
             let decoder = crate::Decoder::new(File::open(path).unwrap());
@@ -2069,7 +2067,6 @@
         Ok(())
     }
 
-    #[test]
     fn image_source_sbit() {
         fn trial(path: &str, expected: Option<Cow<[u8]>>) {
             let decoder = crate::Decoder::new(File::open(path).unwrap());
@@ -2093,7 +2090,6 @@
 
     /// Test handling of a PNG file that contains *two* iCCP chunks.
     /// This is a regression test for https://github.com/image-rs/image/issues/1825.
-    #[test]
     fn test_two_iccp_chunks() {
         // The test file has been taken from
         // https://github.com/image-rs/image/issues/1825#issuecomment-1321798639,
@@ -2127,7 +2123,6 @@
         assert_eq!(dummy_icc, &**dec.info().icc_profile.as_ref().unwrap());
     }
 
-    #[test]
     fn test_png_with_broken_iccp() {
         let decoder = crate::Decoder::new(File::open("tests/iccp/broken_iccp.png").unwrap());
         assert!(decoder.read_info().is_ok());
@@ -2137,7 +2132,6 @@
     }
 
     /// Test handling of `mDCV` and `cLLI` chunks.`
-    #[test]
     fn test_mdcv_and_clli_chunks() {
         let decoder = crate::Decoder::new(File::open("tests/bugfixes/cicp_pq.png").unwrap());
         let reader = decoder.read_info().unwrap();
--- a/src/encoder.rs
+++ b/src/encoder.rs
@@ -1834,7 +1834,7 @@
         }
     }
 
-    #[test]
+    /*#[test]
     fn image_palette() -> Result<()> {
         for &bit_depth in &[1u8, 2, 4, 8] {
             // Do a reference decoding, choose a fitting palette image from pngsuite
@@ -1872,7 +1872,7 @@ mod tests {
             assert_eq!(indexed_data, redecoded);
         }
         Ok(())
-    }
+    }*/
 
     #[test]
     fn expect_error_on_wrong_image_len() -> Result<()> {
diff --git a/src/lib.rs b/src/lib.rs
index 54a789c..78351d7 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -10,7 +10,7 @@
 //! image data is reached.
 //!
 //! ### Using the decoder
-//! ```
+//! ```no_run
 //! use std::fs::File;
 //! // The decoder is a build for reader and can be used to set various decoding options
 //! // via `Transformations`. The default output transformation is `Transformations::IDENTITY`.