Skip to content

Commit 7645d4d

Browse files
committed
Swift: remove ModuleDecl from PrintAst test
1 parent 935e264 commit 7645d4d

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

swift/ql/test/library-tests/ast/PrintAst.expected

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
#-----| [ModuleDecl] __ObjC
2-
#-----| [ModuleDecl] cfg
3-
#-----| [ModuleDecl] declarations
4-
#-----| [ModuleDecl] expressions
5-
#-----| [ModuleDecl] patterns
6-
#-----| [ModuleDecl] statements
71
cfg.swift:
82
# 1| [TopLevelCodeDecl] { ... }
93
# 1| getBody(): [BraceStmt] { ... }

swift/ql/test/library-tests/ast/PrintAst.ql

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,7 @@ import TestUtils
1010
* The hook to customize the entities printed by this query.
1111
*/
1212
class PrintAstConfigurationOverride extends PrintAstConfiguration {
13-
override predicate shouldPrint(Locatable e) { super.shouldPrint(e) and toBeTested(e) }
13+
override predicate shouldPrint(Locatable e) {
14+
super.shouldPrint(e) and toBeTested(e) and not e instanceof ModuleDecl
15+
}
1416
}

0 commit comments

Comments
 (0)