Skip to content
Snippets Groups Projects
Commit a6a7c6f3 authored by Fedor Telnov's avatar Fedor Telnov
Browse files

feat: make macro more hygienic

parent 38a4b718
No related branches found
No related tags found
No related merge requests found
...@@ -3,6 +3,7 @@ use tarantool::test::test_cases; ...@@ -3,6 +3,7 @@ use tarantool::test::test_cases;
use tester::{TestDescAndFn, TestFn, TestOpts}; use tester::{TestDescAndFn, TestFn, TestOpts};
use anyhow::bail; use anyhow::bail;
pub use tarantool::proc as test_entrypoint;
pub const DEFAULT_TEST_ENTRYPOINT: &str = "default_test_entrypoint"; pub const DEFAULT_TEST_ENTRYPOINT: &str = "default_test_entrypoint";
...@@ -36,7 +37,7 @@ macro_rules! bind_test_suite { ...@@ -36,7 +37,7 @@ macro_rules! bind_test_suite {
bind_test_suite!(default_test_entrypoint, $suite); bind_test_suite!(default_test_entrypoint, $suite);
}; };
($entrypoint:ident, $suite:ty) => { ($entrypoint:ident, $suite:ty) => {
#[tarantool::proc] #[$crate::test_entrypoint]
fn $entrypoint(input: String) -> Result<(), Box<dyn std::error::Error>> { fn $entrypoint(input: String) -> Result<(), Box<dyn std::error::Error>> {
$crate::handle_entrypoint::<$suite>(input)?; $crate::handle_entrypoint::<$suite>(input)?;
Ok(()) Ok(())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment