Skip to content

Commit

Permalink
windows support: do not add crlf to test files. Also put testdata at …
Browse files Browse the repository at this point in the history
…the toplevel so it is clear that testdata is not part of the source code
  • Loading branch information
danielrh committed Jun 11, 2018
1 parent a08934b commit 80763e3
Show file tree
Hide file tree
Showing 52 changed files with 86 additions and 85 deletions.
144 changes: 72 additions & 72 deletions src/bin/integration_tests.rs

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/bin/tests.rs
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ fn test_10x_10y() {

#[test]
fn test_alice() {
let in_buf = include_bytes!("testdata/alice29.txt.compressed");
let in_buf = include_bytes!("../../testdata/alice29.txt.compressed");

let mut output = Buffer::new(&[]);
let mut input = super::BrotliDecompressor::new(Buffer::new(in_buf), 1);
Expand All @@ -104,7 +104,7 @@ fn test_alice() {
Err(e) => panic!("Error {:?}", e),
}
let mut i: usize = 0;
let truth = include_bytes!("testdata/alice29.txt");
let truth = include_bytes!("../../testdata/alice29.txt");
while i < truth.len() {
assert_eq!(output.data[i], truth[i]);
i += 1;
Expand Down
22 changes: 11 additions & 11 deletions src/enc/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -289,47 +289,47 @@ macro_rules! test_roundtrip_file {

#[test]
fn test_roundtrip_64x() {
test_roundtrip_file!("../bin/testdata/64x", 72, 9, 10, 3, 2);
test_roundtrip_file!("../../testdata/64x", 72, 9, 10, 3, 2);
}
#[test]
fn test_roundtrip_ukkonooa() {
test_roundtrip_file!("../bin/testdata/ukkonooa", 82, 9, 10, 3, 2);
test_roundtrip_file!("../../testdata/ukkonooa", 82, 9, 10, 3, 2);
}
#[test]
fn test_roundtrip_backward65536() {
test_roundtrip_file!("../bin/testdata/backward65536", 72000, 9, 10, 3, 2);
test_roundtrip_file!("../../testdata/backward65536", 72000, 9, 10, 3, 2);
}
#[test]
fn test_roundtrip_aaabaaaa() {
test_roundtrip_file!("../bin/testdata/aaabaaaa", 72000, 9, 10, 3, 2);
test_roundtrip_file!("../../testdata/aaabaaaa", 72000, 9, 10, 3, 2);
}
#[test]
fn test_roundtrip_monkey() {
test_roundtrip_file!("../bin/testdata/monkey", 72000, 9, 10, 16, 15);
test_roundtrip_file!("../../testdata/monkey", 72000, 9, 10, 16, 15);
}
#[test]
fn test_roundtrip_quickfox_repeated() {
test_roundtrip_file!("../bin/testdata/quickfox_repeated", 16384, 9, 10, 257, 255);
test_roundtrip_file!("../../testdata/quickfox_repeated", 16384, 9, 10, 257, 255);
}

#[test]
fn test_roundtrip_asyoulik() {
test_roundtrip_file!("../bin/testdata/asyoulik.txt", 64384, 9, 15, 513, 511);
test_roundtrip_file!("../../testdata/asyoulik.txt", 64384, 9, 15, 513, 511);
}

#[test]
fn test_roundtrip_asyoulik9_5() {
test_roundtrip_file!("../bin/testdata/asyoulik.txt", 62384, 10, 15, 513, 511);
test_roundtrip_file!("../../testdata/asyoulik.txt", 62384, 10, 15, 513, 511);
}

#[test]
fn test_roundtrip_compressed() {
test_roundtrip_file!("../bin/testdata/compressed_file", 50400, 9, 10, 1025, 1024);
test_roundtrip_file!("../../testdata/compressed_file", 50400, 9, 10, 1025, 1024);
}

#[test]
fn test_roundtrip_compressed_repeated() {
test_roundtrip_file!("../bin/testdata/compressed_repeated",
test_roundtrip_file!("../../testdata/compressed_repeated",
120000,
9,
16,
Expand All @@ -339,7 +339,7 @@ fn test_roundtrip_compressed_repeated() {

#[test]
fn test_roundtrip_quickfox() {
test_roundtrip_file!("../bin/testdata/quickfox", 256, 9, 10, 1, 2);
test_roundtrip_file!("../../testdata/quickfox", 256, 9, 10, 1, 2);
}


Expand Down
1 change: 1 addition & 0 deletions testdata/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* binary
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 80763e3

Please sign in to comment.