mirror of
https://github.com/laosb/ReadabilityFramework.git
synced 2025-04-30 20:51:10 +00:00
test: Add test for char count.
This commit is contained in:
parent
474c4c708d
commit
f4761a4c2c
1 changed files with 2 additions and 0 deletions
|
@ -12,6 +12,7 @@ final class CommonMetrics: XCTestCase {
|
|||
|
||||
func testAllMetrics() throws {
|
||||
let calc = RACommonMetricsCalculator(metrics: [
|
||||
.characterCount,
|
||||
.syllableCount,
|
||||
.wordCount,
|
||||
.sentenceCount,
|
||||
|
@ -22,6 +23,7 @@ final class CommonMetrics: XCTestCase {
|
|||
let results = calc.calculate(on: "Hello, World!")
|
||||
|
||||
XCTAssertEqual(results, [
|
||||
.characterCount: 10.0,
|
||||
.syllableCount: 3.0,
|
||||
.wordCount: 2.0,
|
||||
.sentenceCount: 1.0,
|
||||
|
|
Loading…
Add table
Reference in a new issue