Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
apache
Shardingsphere
提交
6f9294f0
Shardingsphere
项目概览
apache
/
Shardingsphere
通知
56
Star
3
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Shardingsphere
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
6f9294f0
编写于
3月 17, 2020
作者:
J
Juan Pan(Trista)
提交者:
GitHub
3月 17, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
review parsing integrated tests (#4792)
上级
c873a3a2
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
5 addition
and
7 deletion
+5
-7
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/asserts/segment/expression/ExpressionAssert.java
...ntegrate/asserts/segment/expression/ExpressionAssert.java
+1
-1
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/asserts/segment/insert/InsertValuesClauseAssert.java
...rate/asserts/segment/insert/InsertValuesClauseAssert.java
+0
-2
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/asserts/segment/where/WhereClauseAssert.java
...er/integrate/asserts/segment/where/WhereClauseAssert.java
+4
-4
未找到文件。
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/asserts/segment/expression/ExpressionAssert.java
浏览文件 @
6f9294f0
...
...
@@ -94,7 +94,7 @@ public final class ExpressionAssert {
* @param actual actual subquery segment
* @param expected expected subquery expression
*/
public
static
void
assertSubquery
(
final
SQLCaseAssertContext
assertContext
,
final
SubqueryExpressionSegment
actual
,
final
ExpectedSubquery
expected
)
{
public
static
void
assertSubquery
Expression
(
final
SQLCaseAssertContext
assertContext
,
final
SubqueryExpressionSegment
actual
,
final
ExpectedSubquery
expected
)
{
// TODO assert start index, stop index and sub select statement.
SelectStatementAssert
.
assertIs
(
assertContext
,
actual
.
getSubquery
().
getSelect
(),
expected
.
getSelectTestCases
());
// SQLSegmentAssert.assertIs(assertContext, actual, expected);
...
...
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/asserts/segment/insert/InsertValuesClauseAssert.java
浏览文件 @
6f9294f0
...
...
@@ -60,7 +60,5 @@ public final class InsertValuesClauseAssert {
AssignmentValueAssert
.
assertIs
(
assertContext
,
each
,
expected
.
getAssignmentValues
().
get
(
count
));
count
++;
}
// TODO assert start index and stop index
// SQLSegmentAssert.assertIs(assertContext, actual, expected);
}
}
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/asserts/segment/where/WhereClauseAssert.java
浏览文件 @
6f9294f0
...
...
@@ -120,7 +120,7 @@ public final class WhereClauseAssert {
}
else
if
(
actual
.
getExpression
()
instanceof
CommonExpressionSegment
)
{
ExpressionAssert
.
assertCommonExpression
(
assertContext
,
(
ComplexExpressionSegment
)
actual
.
getExpression
(),
expected
.
getCommonExpression
());
}
else
if
(
actual
.
getExpression
()
instanceof
SubqueryExpressionSegment
)
{
ExpressionAssert
.
assertSubquery
(
assertContext
,
(
SubqueryExpressionSegment
)
actual
.
getExpression
(),
expected
.
getSubquery
());
ExpressionAssert
.
assertSubquery
Expression
(
assertContext
,
(
SubqueryExpressionSegment
)
actual
.
getExpression
(),
expected
.
getSubquery
());
}
// TODO assert start index and stop index
// SQLSegmentAssert.assertIs(assertContext, actual, expected);
...
...
@@ -170,7 +170,7 @@ public final class WhereClauseAssert {
int
count
=
0
;
for
(
ExpressionSegment
each
:
actual
.
getSqlExpressions
())
{
if
(
each
instanceof
SubqueryExpressionSegment
)
{
ExpressionAssert
.
assertSubquery
(
assertContext
,
(
SubqueryExpressionSegment
)
each
,
expected
.
getSubqueries
().
get
(
count
));
ExpressionAssert
.
assertSubquery
Expression
(
assertContext
,
(
SubqueryExpressionSegment
)
each
,
expected
.
getSubqueries
().
get
(
count
));
count
++;
}
}
...
...
@@ -192,7 +192,7 @@ public final class WhereClauseAssert {
}
else
if
(
actual
instanceof
CommonExpressionSegment
)
{
ExpressionAssert
.
assertCommonExpression
(
assertContext
,
(
ComplexExpressionSegment
)
actual
,
expected
.
getBetweenCommonExpression
());
}
else
if
(
actual
instanceof
SubqueryExpressionSegment
)
{
ExpressionAssert
.
assertSubquery
(
assertContext
,
(
SubqueryExpressionSegment
)
actual
,
expected
.
getBetweenSubquery
());
ExpressionAssert
.
assertSubquery
Expression
(
assertContext
,
(
SubqueryExpressionSegment
)
actual
,
expected
.
getBetweenSubquery
());
}
}
...
...
@@ -204,7 +204,7 @@ public final class WhereClauseAssert {
}
else
if
(
actual
instanceof
CommonExpressionSegment
)
{
ExpressionAssert
.
assertCommonExpression
(
assertContext
,
(
ComplexExpressionSegment
)
actual
,
expected
.
getAndCommonExpression
());
}
else
if
(
actual
instanceof
SubqueryExpressionSegment
)
{
ExpressionAssert
.
assertSubquery
(
assertContext
,
(
SubqueryExpressionSegment
)
actual
,
expected
.
getAndSubquery
());
ExpressionAssert
.
assertSubquery
Expression
(
assertContext
,
(
SubqueryExpressionSegment
)
actual
,
expected
.
getAndSubquery
());
}
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录