From f4761a4c2cb4bb2b9c343604c98f251b952e69d8 Mon Sep 17 00:00:00 2001 From: Shibo Lyu Date: Fri, 20 May 2022 18:18:38 +0800 Subject: [PATCH] test: Add test for char count. --- Tests/ReadabilityTests/CommonMetrics.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Tests/ReadabilityTests/CommonMetrics.swift b/Tests/ReadabilityTests/CommonMetrics.swift index 982e007..8b5247b 100644 --- a/Tests/ReadabilityTests/CommonMetrics.swift +++ b/Tests/ReadabilityTests/CommonMetrics.swift @@ -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,