Add performance test (no reporting yet)

This commit is contained in:
David Jennes
2018-09-24 00:15:52 +02:00
parent 652dcd246d
commit fff93f18dd
3 changed files with 1144 additions and 1 deletions

View File

@@ -1,6 +1,7 @@
import XCTest
import PathKit
import Spectre
@testable import Stencil
import XCTest
class LexerTests: XCTestCase {
func testLexer() {
@@ -115,4 +116,14 @@ class LexerTests: XCTestCase {
}
}
}
func testPerformance() throws {
let path = Path(#file) + ".." + "fixtures" + "huge.html"
let content: String = try path.read()
measure {
let lexer = Lexer(templateString: content)
_ = lexer.tokenize()
}
}
}

View File

@@ -57,6 +57,7 @@ extension InheritenceTests {
extension LexerTests {
static let __allTests = [
("testLexer", testLexer),
("testPerformance", testPerformance),
]
}

File diff suppressed because it is too large Load Diff