mirror of
https://github.com/github/codeql.git
synced 2026-08-03 08:52:55 +02:00
This adds the possibility to add a special `proc_macro.rs` source file to QL tests, which will be generated into a `proc_macro` crate the usual `lib` crate depends on. This allow to define procedural macros in QL tests, and is here used to move the `macro-expansion` integration test to be a language test instead. As the generated manifests involved were starting to get a bit complex, they are now generated from a `mustache` template.
14 lines
373 B
Rust
14 lines
373 B
Rust
use crate::macro_expansion;
|
|
|
|
fn call_some_functions() {
|
|
macro_expansion::foo();
|
|
macro_expansion::foo_new();
|
|
macro_expansion::bar_0();
|
|
macro_expansion::bar_1();
|
|
macro_expansion::bar_0_new();
|
|
macro_expansion::bar_1_new();
|
|
macro_expansion::S::bzz_0();
|
|
macro_expansion::S::bzz_1();
|
|
macro_expansion::S::bzz_2();
|
|
macro_expansion::S::x();
|
|
} |