diff --git a/app/src/main/java/com/wbrawner/simplemarkdown/model/Sentence.kt b/app/src/main/java/com/wbrawner/simplemarkdown/model/Sentence.kt index 8cce10d..7d64ae7 100644 --- a/app/src/main/java/com/wbrawner/simplemarkdown/model/Sentence.kt +++ b/app/src/main/java/com/wbrawner/simplemarkdown/model/Sentence.kt @@ -2,7 +2,7 @@ package com.wbrawner.simplemarkdown.model import eu.crydee.syllablecounter.SyllableCounter -class Sentence(content: String, private var start: Int = 0, private val end: Int = 0) { +class Sentence(content: String, private var start: Int = 0, private val end: Int = content.length) { private var sentence = content.substring(start, end) private val sc = SyllableCounter() diff --git a/app/src/test/java/com/wbrawner/simplemarkdown/ReadabilityTest.kt b/app/src/test/java/com/wbrawner/simplemarkdown/ReadabilityTest.kt index 9602ddb..f81f570 100644 --- a/app/src/test/java/com/wbrawner/simplemarkdown/ReadabilityTest.kt +++ b/app/src/test/java/com/wbrawner/simplemarkdown/ReadabilityTest.kt @@ -38,12 +38,9 @@ class ReadabilityTest { assertEquals(39, thisIsATest.end().toLong()) } - @Test fun get_syllable_count_for_sentence() { assertEquals(8, Sentence("This is the song that never ends").syllableCount().toLong()) assertEquals(10, Sentence("facility facility downing").syllableCount().toLong()) } - - }