From c4e2c87d8238c403f503855392668ffc4a4724f7 Mon Sep 17 00:00:00 2001 From: Arthur Baars Date: Thu, 11 Feb 2021 16:37:03 +0100 Subject: [PATCH] AST: some statement tests --- ql/test/library-tests/ast/control/Loop.expected | 2 ++ ql/test/library-tests/ast/control/Loop.ql | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ql/test/library-tests/ast/control/Loop.expected b/ql/test/library-tests/ast/control/Loop.expected index 0c32647e0be..f93e73f5ee8 100644 --- a/ql/test/library-tests/ast/control/Loop.expected +++ b/ql/test/library-tests/ast/control/Loop.expected @@ -25,6 +25,7 @@ forExprs | loops.rb:22:1:25:3 | for ... in ... | loops.rb:22:5:22:14 | (..., ...) | loops.rb:22:35:25:3 | ...; ... | 1 | loops.rb:24:3:24:14 | ... *= ... | | loops.rb:28:1:32:3 | for ... in ... | loops.rb:28:5:28:16 | (..., ...) | loops.rb:28:37:32:3 | ...; ... | 0 | loops.rb:29:3:29:14 | ... += ... | | loops.rb:28:1:32:3 | for ... in ... | loops.rb:28:5:28:16 | (..., ...) | loops.rb:28:37:32:3 | ...; ... | 1 | loops.rb:30:3:30:14 | ... /= ... | +| loops.rb:28:1:32:3 | for ... in ... | loops.rb:28:5:28:16 | (..., ...) | loops.rb:28:37:32:3 | ...; ... | 2 | loops.rb:31:3:31:7 | break | forExprsTuplePatterns | loops.rb:22:1:25:3 | for ... in ... | loops.rb:22:5:22:14 | (..., ...) | 0 | loops.rb:22:5:22:7 | key | | loops.rb:22:1:25:3 | for ... in ... | loops.rb:22:5:22:14 | (..., ...) | 1 | loops.rb:22:10:22:14 | value | @@ -32,6 +33,7 @@ forExprsTuplePatterns whileExprs | loops.rb:35:1:39:3 | while ... | loops.rb:35:7:35:11 | ... < ... | loops.rb:35:12:39:3 | ...; ... | 0 | loops.rb:36:3:36:8 | ... += ... | | loops.rb:35:1:39:3 | while ... | loops.rb:35:7:35:11 | ... < ... | loops.rb:35:12:39:3 | ...; ... | 1 | loops.rb:37:3:37:8 | ... += ... | +| loops.rb:35:1:39:3 | while ... | loops.rb:35:7:35:11 | ... < ... | loops.rb:35:12:39:3 | ...; ... | 2 | loops.rb:38:3:38:6 | next | | loops.rb:42:1:45:3 | while ... | loops.rb:42:7:42:11 | ... < ... | loops.rb:42:13:45:3 | ...; ... | 0 | loops.rb:43:3:43:8 | ... += ... | | loops.rb:42:1:45:3 | while ... | loops.rb:42:7:42:11 | ... < ... | loops.rb:42:13:45:3 | ...; ... | 1 | loops.rb:44:3:44:8 | ... += ... | whileModifierExprs diff --git a/ql/test/library-tests/ast/control/Loop.ql b/ql/test/library-tests/ast/control/Loop.ql index 6bae94fe352..d5275b46e33 100644 --- a/ql/test/library-tests/ast/control/Loop.ql +++ b/ql/test/library-tests/ast/control/Loop.ql @@ -13,7 +13,7 @@ query predicate conditionalLoops( cond = l.getCondition() } -query predicate forExprs(ForExpr f, Pattern p, StmtSequence body, int i, Expr bodyChild) { +query predicate forExprs(ForExpr f, Pattern p, StmtSequence body, int i, Stmt bodyChild) { p = f.getPattern() and body = f.getBody() and bodyChild = body.getStmt(i) @@ -24,7 +24,7 @@ query predicate forExprsTuplePatterns(ForExpr f, TuplePattern tp, int i, Pattern cp = tp.getElement(i) } -query predicate whileExprs(WhileExpr e, Expr cond, StmtSequence body, int i, Expr bodyChild) { +query predicate whileExprs(WhileExpr e, Expr cond, StmtSequence body, int i, Stmt bodyChild) { cond = e.getCondition() and body = e.getBody() and bodyChild = body.getStmt(i) @@ -35,7 +35,7 @@ query predicate whileModifierExprs(WhileModifierExpr e, Expr cond, Expr body) { body = e.getBody() } -query predicate untilExprs(UntilExpr e, Expr cond, StmtSequence body, int i, Expr bodyChild) { +query predicate untilExprs(UntilExpr e, Expr cond, StmtSequence body, int i, Stmt bodyChild) { cond = e.getCondition() and body = e.getBody() and bodyChild = body.getStmt(i)