tor-config 0.35.0

Low-level configuration for the Arti Tor implementation
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! Helpers for testing configuration.

/// Assert that the specified error is the specified `kind` of
/// [`ConfigBuildError`](crate::ConfigBuildError).
#[macro_export]
macro_rules! assert_config_error {
    ($err:expr, $kind:tt, $expect_problem:expr) => {
        match $err {
            $crate::ConfigBuildError::$kind { problem, .. } => {
                assert_eq!(problem, $expect_problem);
            }
            _ => {
                panic!("unexpected error {:?}", $err);
            }
        }
    };
}