File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed
Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -199,10 +199,15 @@ impl TestedDialects {
199199 /// Ensures that `sql` parses as a single [Statement], and that
200200 /// re-serializing the parse result produces the same `sql`
201201 /// string (is not modified after a serialization round-trip).
202- pub fn verified_stmt ( & self , sql : & str ) -> Statement {
202+ pub fn verified_statement ( & self , sql : & str ) -> Statement {
203203 self . one_statement_parses_to ( sql, sql)
204204 }
205205
206+ /// Shorthand for [`TestedDialects::verified_statement`].
207+ pub fn verified_stmt ( & self , sql : & str ) -> Statement {
208+ self . verified_statement ( sql)
209+ }
210+
206211 /// Ensures that `sql` parses as a single [Query], and that
207212 /// re-serializing the parse result produces the same `sql`
208213 /// string (is not modified after a serialization round-trip).
Original file line number Diff line number Diff line change @@ -5032,15 +5032,12 @@ fn test_text_cast_with_length_modifier() {
50325032 _ => unreachable ! ( ) ,
50335033 }
50345034
5035- snowflake ( ) . one_statement_parses_to (
5036- "SELECT col::TEXT(16777216) AS col FROM t" ,
5037- "SELECT col::TEXT(16777216) AS col FROM t" ,
5038- ) ;
5035+ snowflake ( ) . verified_statement ( "SELECT col::TEXT(16777216) AS col FROM t" ) ;
50395036}
50405037
50415038#[ test]
50425039fn test_plain_text_data_type_still_parses_as_text ( ) {
5043- match snowflake ( ) . verified_stmt ( "CREATE TABLE t (c TEXT)" ) {
5040+ match snowflake ( ) . verified_statement ( "CREATE TABLE t (c TEXT)" ) {
50445041 Statement :: CreateTable ( CreateTable { columns, .. } ) => {
50455042 assert_eq ! ( columns[ 0 ] . data_type, DataType :: Text ) ;
50465043 }
You can’t perform that action at this time.
0 commit comments