MCPcopy Create free account
hub / github.com/apache/datafusion / assert_parse_error

Function assert_parse_error

benchmarks/src/sql_benchmark.rs:1582–1592  ·  view source on GitHub ↗
(contents: &str, expected_message: &str)

Source from the content-addressed store, hash-verified

1580 }
1581
1582 async fn assert_parse_error(contents: &str, expected_message: &str) {
1583 let error = parse_benchmark(contents)
1584 .await
1585 .expect_err("benchmark parsing should fail");
1586
1587 let message = error.to_string();
1588 assert!(
1589 message.contains(expected_message),
1590 "expected error containing {expected_message:?}, got {message:?}"
1591 );
1592 }
1593
1594 fn assert_result_error_contains<T: Debug>(result: Result<T>, expected_message: &str) {
1595 let error = result.expect_err("operation should fail");

Calls 2

parse_benchmarkFunction · 0.85
to_stringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…