Skip to content

Commit 20d79e4

Browse files
Refactored should_panic test using assert
1 parent 8396a12 commit 20d79e4

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

tests/sqlparser_postgres.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2761,9 +2761,11 @@ fn parse_create_table_with_inherits() {
27612761
}
27622762

27632763
#[test]
2764-
#[should_panic]
27652764
fn parse_create_table_with_empty_inherits_fails() {
2766-
pg().verified_stmt("CREATE TABLE child_table (child_column INT) INHERITS ()");
2765+
assert!(matches!(
2766+
pg().parse_sql_statements("CREATE TABLE child_table (child_column INT) INHERITS ()"),
2767+
Err(ParserError::ParserError(_))
2768+
));
27672769
}
27682770

27692771
#[test]

0 commit comments

Comments
 (0)