Added test for in syntax.

This commit is contained in:
Nikolai Kochetov 2018-05-15 15:31:52 +03:00 committed by alexey-milovidov
parent 6715b945d9
commit 664171a003
2 changed files with 82 additions and 0 deletions

View File

@ -0,0 +1,38 @@
1
1
1
1
1
1
-
1
1
1
1
1
1
1
-
0
0
1
0
1
1
-
0
1
1
1
0
1
0
1
1
0
-
1
1
1
-
(1,2) ((1,2),(3,4)) 1 1

View File

@ -0,0 +1,44 @@
select (1, 2) in tuple((1, 2));
select (1, 2) in ((1, 2), (3, 4));
select ((1, 2), (3, 4)) in ((1, 2), (3, 4));
select ((1, 2), (3, 4)) in (((1, 2), (3, 4)));
select ((1, 2), (3, 4)) in tuple(((1, 2), (3, 4)));
select ((1, 2), (3, 4)) in (((1, 2), (3, 4)), ((5, 6), (7, 8)));
select '-';
select 1 in 1;
select 1 in tuple(1);
select tuple(1) in tuple(1);
select tuple(1) in tuple(tuple(1));
select tuple(tuple(1)) in tuple(tuple(1));
select tuple(tuple(1)) in tuple(tuple(tuple(1)));
select tuple(tuple(tuple(1))) in tuple(tuple(tuple(1)));
select '-';
select 1 in Null;
select 1 in tuple(Null);
select 1 in tuple(Null, 1);
select tuple(1) in tuple(tuple(Null));
select tuple(1) in tuple(tuple(Null), tuple(1));
select tuple(tuple(Null), tuple(1)) in tuple(tuple(Null), tuple(1));
select '-';
select 1 in (1 + 1, 1 - 1);
select 1 in (0 + 1, 1, toInt8(sin(5)));
select (0 + 1, 1, toInt8(sin(5))) in (0 + 1, 1, toInt8(sin(5)));
select identity(tuple(1)) in (tuple(1), tuple(2));
select identity(tuple(1)) in (tuple(0), tuple(2));
select identity(tuple(1)) in (identity(tuple(1)), tuple(2));
select identity(tuple(1)) in (identity(tuple(0)), tuple(2));
select identity(tuple(1)) in (identity(tuple(1)), identity(tuple(2)));
select identity(tuple(1)) in (identity(tuple(1)), identity(identity(tuple(2))));
select identity(tuple(1)) in (identity(tuple(0)), identity(identity(tuple(2))));
select '-';
select identity((1, 2)) in (1, 2);
select identity((1, 2)) in ((1, 2), (3, 4));
select identity((1, 2)) in ((1, 2), identity((3, 4)));
select '-';
select (1,2) as x, ((1,2),(3,4)) as y, 1 in x, x in y;