diff options
Diffstat (limited to 'src/garage/tests/common/macros.rs')
-rw-r--r-- | src/garage/tests/common/macros.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/garage/tests/common/macros.rs b/src/garage/tests/common/macros.rs new file mode 100644 index 00000000..18d0ffeb --- /dev/null +++ b/src/garage/tests/common/macros.rs @@ -0,0 +1,11 @@ +macro_rules! assert_bytes_eq { + ($stream:expr, $bytes:expr) => { + let data = $stream + .collect() + .await + .expect("Error reading data") + .into_bytes(); + + assert_eq!(data.as_ref(), $bytes); + }; +} |