We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 33f9300 commit 02e6f93Copy full SHA for 02e6f93
src/lib.rs
@@ -499,6 +499,21 @@ macro_rules! assert_noop {
499
}
500
501
502
+/// Evaluate any expression and assert that runtime storage has not been mutated
503
+/// (i.e. expression is a storage no-operation).
504
+///
505
+/// Used as `assert_storage_noop(expression_to_assert)`.
506
+#[macro_export]
507
+macro_rules! assert_storage_noop {
508
+ (
509
+ $x:expr
510
+ ) => {
511
+ let h = $crate::storage_root();
512
+ $x;
513
+ assert_eq!(h, $crate::storage_root());
514
+ }
515
+}
516
+
517
/// Assert an expression returns an error specified.
518
///
519
/// Used as `assert_err!(expression_to_assert, expected_error_expression)`
0 commit comments