@@ -2649,15 +2649,15 @@ fn parse_use() {
2649
2649
let quote_styles = [ '\'' , '"' , '`' ] ;
2650
2650
for object_name in & valid_object_names {
2651
2651
// Test single identifier without quotes
2652
- std :: assert_eq!(
2652
+ assert_eq ! (
2653
2653
snowflake( ) . verified_stmt( & format!( "USE {}" , object_name) ) ,
2654
2654
Statement :: Use ( Use :: Object ( ObjectName ( vec![ Ident :: new(
2655
2655
object_name. to_string( )
2656
2656
) ] ) ) )
2657
2657
) ;
2658
2658
for & quote in & quote_styles {
2659
2659
// Test single identifier with different type of quotes
2660
- std :: assert_eq!(
2660
+ assert_eq ! (
2661
2661
snowflake( ) . verified_stmt( & format!( "USE {}{}{}" , quote, object_name, quote) ) ,
2662
2662
Statement :: Use ( Use :: Object ( ObjectName ( vec![ Ident :: with_quote(
2663
2663
quote,
@@ -2669,7 +2669,7 @@ fn parse_use() {
2669
2669
2670
2670
for & quote in & quote_styles {
2671
2671
// Test double identifier with different type of quotes
2672
- std :: assert_eq!(
2672
+ assert_eq ! (
2673
2673
snowflake( ) . verified_stmt( & format!( "USE {0}CATALOG{0}.{0}my_schema{0}" , quote) ) ,
2674
2674
Statement :: Use ( Use :: Object ( ObjectName ( vec![
2675
2675
Ident :: with_quote( quote, "CATALOG" ) ,
@@ -2678,7 +2678,7 @@ fn parse_use() {
2678
2678
) ;
2679
2679
}
2680
2680
// Test double identifier without quotes
2681
- std :: assert_eq!(
2681
+ assert_eq ! (
2682
2682
snowflake( ) . verified_stmt( "USE mydb.my_schema" ) ,
2683
2683
Statement :: Use ( Use :: Object ( ObjectName ( vec![
2684
2684
Ident :: new( "mydb" ) ,
@@ -2688,35 +2688,35 @@ fn parse_use() {
2688
2688
2689
2689
for & quote in & quote_styles {
2690
2690
// Test single and double identifier with keyword and different type of quotes
2691
- std :: assert_eq!(
2691
+ assert_eq ! (
2692
2692
snowflake( ) . verified_stmt( & format!( "USE DATABASE {0}my_database{0}" , quote) ) ,
2693
2693
Statement :: Use ( Use :: Database ( ObjectName ( vec![ Ident :: with_quote(
2694
2694
quote,
2695
2695
"my_database" . to_string( ) ,
2696
2696
) ] ) ) )
2697
2697
) ;
2698
- std :: assert_eq!(
2698
+ assert_eq ! (
2699
2699
snowflake( ) . verified_stmt( & format!( "USE SCHEMA {0}my_schema{0}" , quote) ) ,
2700
2700
Statement :: Use ( Use :: Schema ( ObjectName ( vec![ Ident :: with_quote(
2701
2701
quote,
2702
2702
"my_schema" . to_string( ) ,
2703
2703
) ] ) ) )
2704
2704
) ;
2705
- std :: assert_eq!(
2705
+ assert_eq ! (
2706
2706
snowflake( ) . verified_stmt( & format!( "USE SCHEMA {0}CATALOG{0}.{0}my_schema{0}" , quote) ) ,
2707
2707
Statement :: Use ( Use :: Schema ( ObjectName ( vec![
2708
2708
Ident :: with_quote( quote, "CATALOG" ) ,
2709
2709
Ident :: with_quote( quote, "my_schema" )
2710
2710
] ) ) )
2711
2711
) ;
2712
- std :: assert_eq!(
2712
+ assert_eq ! (
2713
2713
snowflake( ) . verified_stmt( & format!( "USE ROLE {0}my_role{0}" , quote) ) ,
2714
2714
Statement :: Use ( Use :: Role ( ObjectName ( vec![ Ident :: with_quote(
2715
2715
quote,
2716
2716
"my_role" . to_string( ) ,
2717
2717
) ] ) ) )
2718
2718
) ;
2719
- std :: assert_eq!(
2719
+ assert_eq ! (
2720
2720
snowflake( ) . verified_stmt( & format!( "USE WAREHOUSE {0}my_wh{0}" , quote) ) ,
2721
2721
Statement :: Use ( Use :: Warehouse ( ObjectName ( vec![ Ident :: with_quote(
2722
2722
quote,
@@ -2728,7 +2728,7 @@ fn parse_use() {
2728
2728
// Test invalid syntax - missing identifier
2729
2729
let invalid_cases = [ "USE SCHEMA" , "USE DATABASE" , "USE WAREHOUSE" ] ;
2730
2730
for sql in & invalid_cases {
2731
- std :: assert_eq!(
2731
+ assert_eq ! (
2732
2732
snowflake( ) . parse_sql_statements( sql) . unwrap_err( ) ,
2733
2733
ParserError :: ParserError ( "Expected: identifier, found: EOF" . to_string( ) ) ,
2734
2734
) ;
0 commit comments