mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 12:18:19 +00:00
Skip testing two mono tests for now
This commit is contained in:
parent
01dea13b49
commit
e296d35bcd
2 changed files with 12 additions and 7 deletions
|
@ -1,11 +1,14 @@
|
|||
//! Macros for use in `test_mono`.
|
||||
extern crate proc_macro;
|
||||
|
||||
use proc_macro::TokenStream;
|
||||
use proc_macro::{TokenStream, TokenTree};
|
||||
use quote::quote;
|
||||
|
||||
#[proc_macro_attribute]
|
||||
pub fn mono_test(_args: TokenStream, item: TokenStream) -> TokenStream {
|
||||
pub fn mono_test(args: TokenStream, item: TokenStream) -> TokenStream {
|
||||
let no_check = args
|
||||
.into_iter()
|
||||
.any(|tok| matches!(tok, TokenTree::Ident(id) if id.to_string() == "no_check"));
|
||||
let task_fn = syn::parse_macro_input!(item as syn::ItemFn);
|
||||
|
||||
let args = task_fn.sig.inputs.clone();
|
||||
|
@ -21,7 +24,7 @@ pub fn mono_test(_args: TokenStream, item: TokenStream) -> TokenStream {
|
|||
#[test]
|
||||
#(#attributes)*
|
||||
#visibility fn #name(#args) {
|
||||
compiles_to_ir(#name_str, #body);
|
||||
compiles_to_ir(#name_str, #body, #no_check);
|
||||
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue