Macro pest::fails_with [−][src]
Testing tool that compares produced errors.
This macro takes several arguments:
parser
- name of the data structure implementingParser
input
- input to be tested againstrule
-Rule
which will be runpositives
- positiveRule
attempts that failednegative
- negativeRule
attempts that failedpos
- byte position of failure
Examples
fails_with! { parser: AbcParser, input: "abcdf", rule: Rule::a, positives: vec![Rule::c], negatives: vec![], pos: 4 };