[][src]Macro pest::fails_with

macro_rules! fails_with {
    ( parser: $parser:ident, input: $string:expr, rule: $rules:tt :: $rule:tt,
      positives: $positives:expr, negatives: $negatives:expr, pos: $pos:expr ) => { ... };
}

Testing tool that compares produced errors.

This macro takes several arguments:

Examples

fails_with! {
    parser: AbcParser,
    input: "abcdf",
    rule: Rule::a,
    positives: vec![Rule::c],
    negatives: vec![],
    pos: 4
};