Skip to content

Commit

Permalink
test: update tests for new final hashes
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuef committed Jan 10, 2024
1 parent 11f6a70 commit 80d8e87
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions tests/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ async fn cross_platform_check() -> Result<()> {
145, 206, 168, 75, 176, 141, 46, 197, 1, 83, 199, 165, 37, 28,
]),
dst_hash: XorName([
91, 220, 23, 234, 225, 117, 102, 56, 66, 156, 244, 221, 200, 200, 209, 201, 243,
186, 176, 29, 76, 93, 211, 59, 14, 196, 32, 112, 176, 1, 204, 125,
160, 57, 64, 193, 147, 235, 173, 54, 53, 206, 248, 12, 40, 147, 119, 107, 154, 21,
50, 57, 151, 18, 151, 0, 95, 157, 103, 220, 160, 79, 248, 85,
]),
index: 0,
src_size: 0,
Expand Down Expand Up @@ -295,31 +295,36 @@ async fn cross_platform_check() -> Result<()> {
},
ChunkInfo {
src_hash: XorName([
234, 107, 8, 130, 125, 216, 160, 160, 13, 230, 7, 11, 37, 118, 105, 223, 105, 87,
90, 209, 211, 79, 27, 158, 16, 167, 235, 67, 91, 131, 251, 172,
227, 224, 98, 89, 131, 120, 169, 214, 165, 171, 189, 187, 15, 7, 80, 133, 16, 63,
74, 197, 17, 127, 22, 137, 171, 117, 34, 195, 186, 185, 51, 2,
]),
dst_hash: XorName([
115, 244, 10, 81, 146, 92, 255, 68, 159, 239, 113, 254, 174, 79, 20, 28, 89, 48,
192, 18, 78, 92, 61, 129, 26, 243, 119, 250, 119, 18, 168, 130,
166, 232, 206, 232, 6, 23, 232, 20, 105, 230, 249, 86, 35, 117, 181, 65, 192, 245,
65, 130, 238, 50, 188, 82, 193, 115, 172, 113, 237, 33, 248, 102,
]),
index: 0,
src_size: 0,
},
ChunkInfo {
src_hash: XorName([
173, 132, 16, 44, 184, 235, 162, 98, 194, 197, 157, 156, 131, 245, 181, 91, 83, 51,
15, 204, 124, 193, 209, 249, 155, 19, 89, 201, 64, 247, 95, 73,
199, 77, 9, 166, 29, 63, 254, 6, 165, 71, 110, 151, 121, 199, 60, 144, 197, 6, 92,
182, 237, 202, 223, 171, 20, 80, 193, 237, 148, 96, 190, 70,
]),
dst_hash: XorName([
64, 23, 138, 48, 198, 43, 63, 70, 55, 164, 9, 209, 103, 37, 27, 45, 49, 204, 180,
86, 179, 79, 240, 178, 148, 160, 184, 252, 32, 102, 123, 216,
221, 131, 122, 148, 84, 180, 72, 155, 240, 84, 4, 189, 156, 65, 164, 204, 215, 198,
118, 227, 41, 95, 185, 117, 152, 128, 119, 205, 173, 180, 155, 86,
]),
index: 0,
src_size: 0,
},
];

for (i, c) in data_map.infos().into_iter().enumerate() {
println!("expected[i].src_hash {:?}", ref_data_map[i].src_hash.0);
println!("got .src_hash {:?}", c.src_hash.0);
println!("expected[i].dst_hash {:?}", ref_data_map[i].dst_hash.0);
println!("got .dst_hash {:?}", c.dst_hash.0);

assert_eq!(c.src_hash, ref_data_map[i].src_hash);
assert_eq!(c.dst_hash, ref_data_map[i].dst_hash);
}
Expand Down

0 comments on commit 80d8e87

Please sign in to comment.