This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import XCTest | |
| import Eval // https://github.com/tevelee/Eval | |
| class MiniExpressionStandardLibraryTest: XCTestCase { | |
| private func evaluate<R>(_ expression: String, inputs: [String: Any] = [:]) -> R? { | |
| let context = Context(variables: inputs) | |
| let interpreter = TypedInterpreter(dataTypes: MiniExpressionStandardLibrary.dataTypes, functions: MiniExpressionStandardLibrary.functions, context: context) | |
| let result = interpreter.evaluate(expression) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| collections: | |
| microposts: | |
| output: true | |
| permalink: /micro/:year/:month/:name.html | |
| defaults: | |
| - scope: | |
| path: "" | |
| type: microposts | |
| values: |