Merge branch 'master' into dynamic-filter

This commit is contained in:
Ilya Puchka
2018-10-01 22:45:21 +01:00
committed by GitHub
15 changed files with 116 additions and 57 deletions

View File

@@ -145,7 +145,7 @@ class IfNodeTests: XCTestCase {
$0.it("can parse an if with complex expression") {
let tokens: [Token] = [
.block(value: "if value == \"test\" and not name", at: .unknown),
.block(value: "if value == \"test\" and (not name or not (name and surname) or( some )and other )", at: .unknown),
.text(value: "true", at: .unknown),
.block(value: "endif", at: .unknown)
]

View File

@@ -7,7 +7,7 @@ class TokenTests: XCTestCase {
describe("Token") {
$0.it("can split the contents into components") {
let token = Token.text(value: "hello world", at: .unknown)
let components = token.components()
let components = token.components
try expect(components.count) == 2
try expect(components[0]) == "hello"
@@ -16,7 +16,7 @@ class TokenTests: XCTestCase {
$0.it("can split the contents into components with single quoted strings") {
let token = Token.text(value: "hello 'kyle fuller'", at: .unknown)
let components = token.components()
let components = token.components
try expect(components.count) == 2
try expect(components[0]) == "hello"
@@ -25,7 +25,7 @@ class TokenTests: XCTestCase {
$0.it("can split the contents into components with double quoted strings") {
let token = Token.text(value: "hello \"kyle fuller\"", at: .unknown)
let components = token.components()
let components = token.components
try expect(components.count) == 2
try expect(components[0]) == "hello"