edith_codecs
Clone
https://git.tahinli.com/Tahinli/edith_codecs.git
0 watching0 forksRust370.3 MiB9b67700Tahinli3 days ago4021 commits
| 1 | //! No-panic floor for the decoder on malformed input. |
| 2 | //! |
| 3 | //! For each of the first 10 JVT conformance streams (the same name-sorted walk |
| 4 | //! `conformance.rs` uses), truncate at 8 positions and flip one byte at 30 |
| 5 | //! fixed-seed positions. Every mutant is decoded end to end. An `Err` is fine; |
| 6 | //! a panic fails the test. |
| 7 | //! |
| 8 | //! Fixture-gated like the other conformance tests: without `fixtures/` the test |
| 9 | //! skips loudly, or fails when `EC_REQUIRE_FIXTURES` is set. |
| 10 | |
| 11 | use ; |
| 12 | |
| 13 | use ; |
| 14 | |
| 15 | use find_stream; |
| 16 | |
| 17 | const STREAMS: usize = 10; |
| 18 | const TRUNCATIONS: usize = 8; |
| 19 | const CORRUPTIONS: usize = 30; |
| 20 | const SEED: u32 = 0x9E37_79B9; |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 25 | |
| 26 | /// Every vector directory, in name order (the order `conformance.rs` walks). |
| 27 | |
| 28 | |
| 29 | |
| 30 | |
| 31 | |
| 32 | |
| 33 | |
| 34 | |
| 35 | |
| 36 | |
| 37 | |
| 38 | |
| 39 | /// Decode a whole byte stream, ignoring every error. Only a panic matters here. |
| 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 | |
| 95 | |
| 96 |