potential rewrite of matchprefixed

This commit is contained in:
Henry Schimke
2022-09-03 17:17:42 -05:00
parent d80ead1d7b
commit 65029818c7
14 changed files with 443 additions and 331 deletions

View File

@@ -49,9 +49,9 @@ fn doTest(contents: &str, number: &str, title: &str) {
let fakeRXingResult =
RXingResult::new(contents, Vec::new(), Vec::new(), BarcodeFormat::QR_CODE);
let result = ResultParser::parseRXingResult(&fakeRXingResult);
assert_eq!(ParsedRXingResultType::TEL, result.getType());
if let ParsedClientResult::TelResult(telRXingResult) = result {
assert_eq!(ParsedRXingResultType::TEL, telRXingResult.getType());
assert_eq!(number, telRXingResult.getNumber());
assert_eq!(title, telRXingResult.getTitle());
assert_eq!(format!("tel:{}", number), telRXingResult.getTelURI());