db/mac/
test.rs

1/// Defines a unit test function.
2#[macro_export]
3#[cfg(feature = "test-suite")]
4macro_rules! define_test {
5	($name:ident, $code:expr) => {
6		#[tokio::test]
7		async fn $name() {
8			$crate::tests::$name($code).await;
9		}
10	};
11}
12
13/// Use this macro to enable the entire standard test suite.
14#[macro_export]
15#[cfg(feature = "test-suite")]
16macro_rules! full_adapter_test_impl {
17	($code:expr) => {
18		#[cfg(test)]
19		define_test!(should_delete_key, $code);
20		#[cfg(test)]
21		define_test!(should_set_key, $code);
22		#[cfg(test)]
23		define_test!(should_put_key, $code);
24	};
25}
26
27#[macro_export]
28#[cfg(feature = "test-suite")]
29macro_rules! full_database_test_impl {
30	($test_name: ident, $code:expr) => {
31		#[cfg(test)]
32		mod $test_name {
33			define_test!(vertex_with_property, $code);
34			define_test!(vertex_with_many_property, $code);
35			define_test!(vertices_iter, $code);
36			define_test!(vertex_property, $code);
37			define_test!(multiple_new_vertex, $code);
38			define_test!(vertex_has_step, $code);
39			define_test!(basic_relationship, $code);
40		}
41	};
42}