Skip to content

Commit 948d73f

Browse files
authored
refactor: make parser tests integration tests (#485)
let me know if you want this. I think the separation will be beneficial when I add the regression test suite back. ref: https://doc.rust-lang.org/rust-by-example/testing/integration_testing.html
1 parent 4394106 commit 948d73f

File tree

387 files changed

+689
-656
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

387 files changed

+689
-656
lines changed

crates/squawk_parser/src/lexed_str.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ impl<'a> LexedStr<'a> {
8686
let hi = self.start[i + 1] as usize;
8787
lo..hi
8888
}
89-
pub(crate) fn text_start(&self, i: usize) -> usize {
89+
pub fn text_start(&self, i: usize) -> usize {
9090
assert!(i <= self.len());
9191
self.start[i] as usize
9292
}

crates/squawk_parser/src/lib.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,6 @@ mod event;
6060
mod input;
6161
mod output;
6262

63-
#[cfg(test)]
64-
mod test;
65-
6663
pub use crate::{
6764
lexed_str::LexedStr,
6865
// output::{Output, Step},

crates/squawk_parser/src/snapshots/squawk_parser__test__alter_aggregate_err.snap

Lines changed: 0 additions & 45 deletions
This file was deleted.

crates/squawk_parser/src/snapshots/squawk_parser__test__alter_table_err.snap

Lines changed: 0 additions & 111 deletions
This file was deleted.

crates/squawk_parser/src/test.rs

Lines changed: 0 additions & 116 deletions
This file was deleted.

crates/squawk_parser/test_data/err/alter_foreign_data_wrapper.sql renamed to crates/squawk_parser/tests/data/err/alter_foreign_data_wrapper.sql

File renamed without changes.

crates/squawk_parser/test_data/err/alter_sequence.sql renamed to crates/squawk_parser/tests/data/err/alter_sequence.sql

File renamed without changes.
File renamed without changes.
File renamed without changes.

crates/squawk_parser/test_data/err/create_function.sql renamed to crates/squawk_parser/tests/data/err/create_function.sql

File renamed without changes.

0 commit comments

Comments
 (0)