This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -45,11 +45,11 @@ impl DocTestRunner {
45
45
self . crate_attrs . insert ( line. to_string ( ) ) ;
46
46
}
47
47
}
48
- // if !self.ids.is_empty() {
49
- // self.ids.push(',');
50
- // }
48
+ if !self . ids . is_empty ( ) {
49
+ self . ids . push ( ',' ) ;
50
+ }
51
51
self . ids . push_str ( & format ! (
52
- "tests.push( {}::TEST); \n " ,
52
+ "{}::TEST" ,
53
53
generate_mergeable_doctest(
54
54
doctest,
55
55
scraped_test,
@@ -107,14 +107,14 @@ impl DocTestRunner {
107
107
#[rustc_main]
108
108
#[coverage(off)]
109
109
fn main() {{
110
- let mut tests = Vec::new();
111
- {ids}
110
+ const TESTS: [test::TestDescAndFn; {nb_tests}] = [{ids}];
112
111
test::test_main(
113
112
&[{test_args}],
114
- tests ,
113
+ Vec::from(TESTS) ,
115
114
None,
116
115
);
117
116
}}" ,
117
+ nb_tests = self . nb_tests,
118
118
output = self . output,
119
119
ids = self . ids,
120
120
)
@@ -192,7 +192,7 @@ pub const TEST: test::TestDescAndFn = test::TestDescAndFn {{
192
192
compile_fail: false,
193
193
no_run: {no_run},
194
194
should_panic: test::ShouldPanic::{should_panic},
195
- test_type: test::TestType::UnitTest ,
195
+ test_type: test::TestType::DocTest ,
196
196
}},
197
197
testfn: test::StaticTestFn(
198
198
#[coverage(off)]
You can’t perform that action at this time.
0 commit comments