Swift: Autoformat tests.

This commit is contained in:
Geoffrey White
2022-06-28 16:39:11 +01:00
parent 822002d37d
commit 2cf65c7d35
2 changed files with 24 additions and 13 deletions

View File

@@ -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

View File

@@ -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