Skip to content

Commit

Permalink
test: fix misleading test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
ChobobDev committed Jul 20, 2023
1 parent 5d2b684 commit 2032406
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
26 changes: 13 additions & 13 deletions test-suite/src/array.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use {
crate::*,
gluesql_core::{
error::TranslateError,
error::InsertError,
prelude::{Payload, Value::*},
},
};
Expand Down Expand Up @@ -55,12 +55,12 @@ CREATE TABLE Test (
sql: "SELECT * FROM Test;",
expected: Ok(select_with_null!(
id | surname | name;
I64(1) Str("CHO".to_owned()) Array(["Seongbin","Bernie"].to_owned());
I64(3) Str("CHO".to_owned()) Array(["Seongbin","Bernie","Chobobdev"].to_owned());
I64(2) Str("CHO".to_owned()) Array(["devgony","Henry"].to_owned());
I64(5) Str("DOE".to_owned()) Array(["Jhon"].to_owned());
I64(1) Str("DOE".to_owned()) Array(["Jane"].to_owned());
I64(1) Null Array(["GlueSQL"].to_owned())
I64(1) Str("CHO".to_owned()) List(["Seongbin","Bernie"].to_owned());
I64(3) Str("CHO".to_owned()) List(["Seongbin","Bernie","Chobobdev"].to_owned());
I64(2) Str("CHO".to_owned()) List(["devgony","Henry"].to_owned());
I64(5) Str("DOE".to_owned()) List(["Jhon"].to_owned());
I64(1) Str("DOE".to_owned()) List(["Jane"].to_owned());
I64(1) Null List(["GlueSQL"].to_owned())
))
};

Expand All @@ -77,12 +77,12 @@ CREATE TABLE Test (
sql: "SELECT * FROM Target;",
expected: Ok(select_with_null!(
id | surname | name;
I64(1) Str("CHO".to_owned()) Array(["Seongbin","Bernie"].to_owned());
I64(3) Str("CHO".to_owned()) Array(["Seongbin","Bernie","Chobobdev"].to_owned());
I64(2) Str("CHO".to_owned()) Array(["devgony","Henry"].to_owned());
I64(5) Str("DOE".to_owned()) Array(["Jhon"].to_owned());
I64(1) Str("DOE".to_owned()) Array(["Jane"].to_owned());
I64(1) Null Array(["GlueSQL"].to_owned())
I64(1) Str("CHO".to_owned()) List(["Seongbin","Bernie"].to_owned());
I64(3) Str("CHO".to_owned()) List(["Seongbin","Bernie","Chobobdev"].to_owned());
I64(2) Str("CHO".to_owned()) List(["devgony","Henry"].to_owned());
I64(5) Str("DOE".to_owned()) List(["Jhon"].to_owned());
I64(1) Str("DOE".to_owned()) List(["Jane"].to_owned());
I64(1) Null List(["GlueSQL"].to_owned())
))
};

Expand Down
1 change: 1 addition & 0 deletions test-suite/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ pub mod unary_operator;
pub mod update;
pub mod validate;
pub mod values;
pub mod array;

pub mod tester;

Expand Down

0 comments on commit 2032406

Please sign in to comment.