minor fixes
This commit is contained in:
parent
c609f51c6a
commit
65f1e5d083
3 changed files with 5 additions and 5 deletions
|
|
@ -76,7 +76,7 @@ mod tests {
|
||||||
);
|
);
|
||||||
check_trait(format!("{chunk:?}"), repr_expect, "Debug", "Chunk");
|
check_trait(format!("{chunk:?}"), repr_expect, "Debug", "Chunk");
|
||||||
|
|
||||||
assert_eq!(chunk.get_file_id().to_string(), "fid");
|
assert_eq!(chunk.get_file_id().to_string(), "");
|
||||||
assert_eq!(chunk.get_offset(), mock_offset);
|
assert_eq!(chunk.get_offset(), mock_offset);
|
||||||
assert_eq!(chunk.get_data(), data);
|
assert_eq!(chunk.get_data(), data);
|
||||||
assert_eq!(chunk.get_length(), len);
|
assert_eq!(chunk.get_length(), len);
|
||||||
|
|
|
||||||
|
|
@ -192,8 +192,8 @@ mod tests {
|
||||||
#[test]
|
#[test]
|
||||||
fn test_pub_endpoints() {
|
fn test_pub_endpoints() {
|
||||||
let uri = Uri::default();
|
let uri = Uri::default();
|
||||||
let share_id = ShareID::default();
|
let share_id = ShareID::from("sid".to_string());
|
||||||
let file_id = FileID::default();
|
let file_id = FileID::new_test("fid".to_string());
|
||||||
|
|
||||||
assert_eq!("/api/v2/alias/upload/new", uri.share_create());
|
assert_eq!("/api/v2/alias/upload/new", uri.share_create());
|
||||||
assert_eq!("/api/v2/alias/mail/notify/sid", uri.share_notify(&share_id));
|
assert_eq!("/api/v2/alias/mail/notify/sid", uri.share_notify(&share_id));
|
||||||
|
|
|
||||||
|
|
@ -15,9 +15,9 @@ const DATA: [&[u8]; 8] = [
|
||||||
0x3C, 0xA7, 0x5D, 0xE1, 0x4F, 0x99, 0x00, 0x20, 0x7F, 0xB3, 0xCD, 0x8A, 0x10, 0x55, 0xAA,
|
0x3C, 0xA7, 0x5D, 0xE1, 0x4F, 0x99, 0x00, 0x20, 0x7F, 0xB3, 0xCD, 0x8A, 0x10, 0x55, 0xAA,
|
||||||
0xFF, 0x5E, 0xA3, 0x1F, 0xC8, 0x72, 0x4D, 0x99, 0x00, 0xB7, 0x3C, 0x8E, 0xAD, 0x26, 0xF1,
|
0xFF, 0x5E, 0xA3, 0x1F, 0xC8, 0x72, 0x4D, 0x99, 0x00, 0xB7, 0x3C, 0x8E, 0xAD, 0x26, 0xF1,
|
||||||
],
|
],
|
||||||
// long run of identical bytes (1 kib of ascii 'a')
|
// long run of identical bytes (1 KiB of ascii 'A')
|
||||||
&[b'A'; 1024],
|
&[b'A'; 1024],
|
||||||
// very large slice (10 mib of zeroes)
|
// very large slice (10 MiB of zeroes)
|
||||||
&[0u8; 10 * 1024 * 1024],
|
&[0u8; 10 * 1024 * 1024],
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue