mirror of
https://github.com/github/codeql.git
synced 2026-04-20 14:34:04 +02:00
Swift: Autoformat tests.
This commit is contained in:
@@ -1,14 +1,21 @@
|
||||
import swift
|
||||
|
||||
string describe(ArithmeticOperation e) {
|
||||
(e instanceof BinaryArithmeticOperation and result = "BinaryArithmeticOperation") or
|
||||
(e instanceof AddExpr and result = "AddExpr") or
|
||||
(e instanceof SubExpr and result = "SubExpr") or
|
||||
(e instanceof MulExpr and result = "MulExpr") or
|
||||
(e instanceof DivExpr and result = "DivExpr") or
|
||||
(e instanceof RemExpr and result = "RemExpr") or
|
||||
(e instanceof UnaryArithmeticOperation and result = "UnaryArithmeticOperation") or
|
||||
(e instanceof UnaryMinusExpr and result = "UnaryMinusExpr")
|
||||
e instanceof BinaryArithmeticOperation and result = "BinaryArithmeticOperation"
|
||||
or
|
||||
e instanceof AddExpr and result = "AddExpr"
|
||||
or
|
||||
e instanceof SubExpr and result = "SubExpr"
|
||||
or
|
||||
e instanceof MulExpr and result = "MulExpr"
|
||||
or
|
||||
e instanceof DivExpr and result = "DivExpr"
|
||||
or
|
||||
e instanceof RemExpr and result = "RemExpr"
|
||||
or
|
||||
e instanceof UnaryArithmeticOperation and result = "UnaryArithmeticOperation"
|
||||
or
|
||||
e instanceof UnaryMinusExpr and result = "UnaryMinusExpr"
|
||||
}
|
||||
|
||||
from ArithmeticOperation e
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
import swift
|
||||
|
||||
string describe(LogicalOperation e) {
|
||||
(e instanceof BinaryLogicalOperation and result = "BinaryLogicalExpr") or
|
||||
(e instanceof LogicalAndExpr and result = "LogicalAndExpr") or
|
||||
(e instanceof LogicalOrExpr and result = "LogicalOrExpr") or
|
||||
(e instanceof UnaryLogicalOperation and result = "UnaryLogicalOperation") or
|
||||
(e instanceof NotExpr and result = "NotExpr")
|
||||
e instanceof BinaryLogicalOperation and result = "BinaryLogicalExpr"
|
||||
or
|
||||
e instanceof LogicalAndExpr and result = "LogicalAndExpr"
|
||||
or
|
||||
e instanceof LogicalOrExpr and result = "LogicalOrExpr"
|
||||
or
|
||||
e instanceof UnaryLogicalOperation and result = "UnaryLogicalOperation"
|
||||
or
|
||||
e instanceof NotExpr and result = "NotExpr"
|
||||
}
|
||||
|
||||
from LogicalOperation e
|
||||
|
||||
Reference in New Issue
Block a user