mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-08-03 22:08:16 +00:00
Introduce tests/test_utils/mod.rs and use it consistently
To share helper macros between various tests/* we added a new module (tests/macros/mod.rs). This made the prologue to be used in tests quite long and a little weird: ``` #[macro_use] #[path = "macros/mod.rs"] mod macros; use sqlparser::test_utils::*; ``` This simplifies it to: ``` #[macro_use] mod test_utils; use test_utils::*; ``` - and switches all existing tests to the new prologue simultaneously... ...while fixing a few other inconsistencies and adding a few comments about the way `test_utils` work.
This commit is contained in:
parent
99fb633221
commit
4128dfe1db
10 changed files with 48 additions and 12 deletions
|
@ -11,13 +11,15 @@
|
|||
// limitations under the License.
|
||||
|
||||
#![warn(clippy::all)]
|
||||
|
||||
//! Test SQL syntax specific to MySQL. The parser based on the generic dialect
|
||||
//! is also tested (on the inputs it can handle).
|
||||
|
||||
#[macro_use]
|
||||
mod test_utils;
|
||||
use test_utils::*;
|
||||
|
||||
use sqlparser::ast::*;
|
||||
use sqlparser::dialect::{GenericDialect, MySqlDialect};
|
||||
use sqlparser::test_utils::*;
|
||||
use sqlparser::tokenizer::Token;
|
||||
|
||||
#[test]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue