Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 65ece6e

Browse files
author
Max Schaefer
committed
JavaScript: Consolidate TypeAnnotations tests.
1 parent 716e741 commit 65ece6e

87 files changed

Lines changed: 435 additions & 348 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

javascript/ql/test/library-tests/TypeScript/TypeAnnotations/ArrayTypeExpr.expected

Lines changed: 0 additions & 10 deletions
This file was deleted.

javascript/ql/test/library-tests/TypeScript/TypeAnnotations/ArrayTypeExpr.ql

Lines changed: 0 additions & 4 deletions
This file was deleted.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import javascript
2+
3+
query predicate test_ArrayTypeExpr(ArrayTypeExpr expr, TypeExpr res) { res = expr.getElementType() }

javascript/ql/test/library-tests/TypeScript/TypeAnnotations/ChildIndex.expected

Whitespace-only changes.

javascript/ql/test/library-tests/TypeScript/TypeAnnotations/ChildIndex.ql

Lines changed: 0 additions & 8 deletions
This file was deleted.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import javascript
2+
3+
query predicate test_ChildIndex(ASTNode node, string res) {
4+
exists(ASTNode child1, ASTNode child2, int index |
5+
node.getChild(index) = child1 and node.getChild(index) = child2 and child1 != child2
6+
|
7+
res = "There are two different children at index " + index.toString()
8+
)
9+
}

javascript/ql/test/library-tests/TypeScript/TypeAnnotations/Containers.expected

Whitespace-only changes.

javascript/ql/test/library-tests/TypeScript/TypeAnnotations/Containers.ql renamed to javascript/ql/test/library-tests/TypeScript/TypeAnnotations/Containers.qll

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,4 @@ class DifferentEnclosingStmt extends Violation, VarDecl {
4040
override string reason() { result = "Type annotation has different enclosing statement" }
4141
}
4242

43-
from Violation err
44-
select err, err.reason()
43+
query predicate test_Containers(Violation err, string res) { res = err.reason() }

javascript/ql/test/library-tests/TypeScript/TypeAnnotations/FieldTypes.expected

Lines changed: 0 additions & 6 deletions
This file was deleted.

javascript/ql/test/library-tests/TypeScript/TypeAnnotations/FieldTypes.ql

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)