Use upstream cov-mark

This commit is contained in:
Laurențiu Nicola 2021-03-08 22:19:44 +02:00
parent c5189a22cc
commit fc9eed4836
101 changed files with 354 additions and 514 deletions

View file

@ -17,7 +17,6 @@ mod benchmark;
use std::fmt;
use test_utils::mark;
pub use tt::{Delimiter, DelimiterKind, Punct};
use crate::{
@ -217,7 +216,7 @@ impl MacroDef {
let mut rules = Vec::new();
if Some(tt::DelimiterKind::Brace) == tt.delimiter_kind() {
mark::hit!(parse_macro_def_rules);
cov_mark::hit!(parse_macro_def_rules);
while src.len() > 0 {
let rule = Rule::parse(&mut src, true)?;
rules.push(rule);
@ -229,7 +228,7 @@ impl MacroDef {
}
}
} else {
mark::hit!(parse_macro_def_simple);
cov_mark::hit!(parse_macro_def_simple);
let rule = Rule::parse(&mut src, false)?;
if src.len() != 0 {
return Err(ParseError::Expected("remain tokens in macro def".to_string()));

View file

@ -6,7 +6,7 @@ use syntax::{
SyntaxKind::{ERROR, IDENT},
SyntaxNode, WalkEvent, T,
};
use test_utils::{assert_eq_text, mark};
use test_utils::assert_eq_text;
use super::*;
@ -687,7 +687,7 @@ fn test_match_literal() {
#[test]
fn test_parse_macro_def_simple() {
mark::check!(parse_macro_def_simple);
cov_mark::check!(parse_macro_def_simple);
parse_macro2(
r#"
@ -701,7 +701,7 @@ macro foo($id:ident) {
#[test]
fn test_parse_macro_def_rules() {
mark::check!(parse_macro_def_rules);
cov_mark::check!(parse_macro_def_rules);
parse_macro2(
r#"