Macro 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:
parser- name of the data structure implementingParserinput- input to be tested againstrule-Rulewhich will be runpositives- positiveRuleattempts that failednegatives- negativeRuleattempts that failedpos- byte position of failure
Examples
#
# extern crate pest;
# use Parser;
# use Error;
# use Pairs;
#