feat: Added indent filter (#188)

This commit is contained in:
Ilya Puchka
2018-01-28 17:17:23 +01:00
committed by Kyle Fuller
parent 4827fb8e20
commit fa68ba9df8
7 changed files with 94 additions and 0 deletions

View File

@@ -71,6 +71,13 @@ func testVariable() {
try expect(result) == 3.14
}
$0.it("can resolve boolean literal") {
try expect(Variable("true").resolve(context) as? Bool) == true
try expect(Variable("false").resolve(context) as? Bool) == false
try expect(Variable("0").resolve(context) as? Int) == 0
try expect(Variable("1").resolve(context) as? Int) == 1
}
$0.it("can resolve a string variable") {
let variable = Variable("name")
let result = try variable.resolve(context) as? String