Skip to content

Commit f13fbd9

Browse files
committed
fix: test macros
1 parent 6b5f196 commit f13fbd9

File tree

1 file changed

+2
-2
lines changed
  • magicblock-chainlink/src/testing

1 file changed

+2
-2
lines changed

magicblock-chainlink/src/testing/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,7 @@ macro_rules! assert_loaded_program_with_size {
317317
$loader,
318318
$loader_status
319319
);
320+
let actual_size = loaded_program.program_data.len();
320321
let (min, max) = $crate::min_max_with_deviation_percent($size, 5.0);
321322
assert!(
322323
actual_size >= min && actual_size <= max,
@@ -332,8 +333,7 @@ macro_rules! assert_loaded_program_with_size {
332333
#[macro_export]
333334
macro_rules! assert_data_has_size {
334335
($data:expr, $size:expr) => {{
335-
// Program size may vary a bit
336-
// especially across differnt solana versions + OSes
336+
let actual_size = $data.len();
337337
let (min, max) = $crate::min_max_with_deviation_percent($size, 5.0);
338338
assert!(
339339
actual_size >= min && actual_size <= max,

0 commit comments

Comments
 (0)