Skip to content

Commit 2a88667

Browse files
committed
tests/datatests: better workaround for $path::run_test rustc limitation
For some reason $path::whatever is not a valid `path` according to rustc. See: - nextest-rs/datatest-stable#4 - rust-lang/rust#48067
1 parent d7d7e35 commit 2a88667

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

tests/datatests/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
// along with Hun-law. If not, see <http://www.gnu.org/licenses/>.
1616

1717
pub mod grammar;
18-
pub use grammar::*;
1918

2019
pub mod test_pdf_parser;
2120
pub mod test_structure_parser;

tests/run_datatests.rs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
mod datatests;
1818
pub mod test_utils;
1919

20-
use datatests::*;
21-
2220
#[allow(unused_macros)]
2321
macro_rules! declare_test {
2422
(dir = $dir:expr, pattern = $pattern:expr) => {
@@ -37,12 +35,12 @@ macro_rules! declare_test {
3735
pub(crate) use declare_test;
3836

3937
macro_rules! generate_harness{
40-
($($test:ident),*) => {
38+
($($id_first:ident$(::$id_rest:ident)*),*) => {
4139
datatest_stable::harness!(
4240
$(
43-
$test::run_test,
44-
$test::test_dir(),
45-
$test::FILE_PATTERN,
41+
datatests::$id_first$(::$id_rest)*::run_test,
42+
datatests::$id_first$(::$id_rest)*::test_dir(),
43+
datatests::$id_first$(::$id_rest)*::FILE_PATTERN,
4644
)*
4745
);
4846
}
@@ -51,5 +49,5 @@ macro_rules! generate_harness{
5149
generate_harness!(
5250
test_pdf_parser,
5351
test_structure_parser,
54-
test_reference_parsing
52+
grammar::test_reference_parsing
5553
);

0 commit comments

Comments
 (0)