Skip to content

Commit 3167a20

Browse files
committed
Make easier for IDE to navigate in aggregator integration tests macro
By using the "static" method calls.
1 parent c40df8f commit 3167a20

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

mithril-aggregator/tests/test_extensions/runtime_tester.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,15 @@ use crate::test_extensions::{AggregatorObserver, ExpectedCertificate};
3333
#[macro_export]
3434
macro_rules! cycle {
3535
( $tester:expr, $expected_state:expr ) => {{
36-
$tester.cycle().await.unwrap();
36+
RuntimeTester::cycle(&mut $tester).await.unwrap();
3737
assert_eq!($expected_state, $tester.runtime.get_state());
3838
}};
3939
}
4040

4141
#[macro_export]
4242
macro_rules! cycle_err {
4343
( $tester:expr, $expected_state:expr ) => {{
44-
$tester
45-
.cycle()
44+
RuntimeTester::cycle(&mut $tester)
4645
.await
4746
.expect_err("cycle tick should have returned an error");
4847
assert_eq!($expected_state, $tester.runtime.get_state());
@@ -52,7 +51,9 @@ macro_rules! cycle_err {
5251
#[macro_export]
5352
macro_rules! assert_last_certificate_eq {
5453
( $tester:expr, $expected_certificate:expr ) => {{
55-
let last_certificate = $tester.get_last_expected_certificate().await.unwrap();
54+
let last_certificate = RuntimeTester::get_last_expected_certificate(&mut $tester)
55+
.await
56+
.unwrap();
5657
assert_eq!($expected_certificate, last_certificate);
5758
}};
5859
}

0 commit comments

Comments
 (0)