exercism / exercism/problem-specifications
Transpose test cases inconsistent.
- Lenguaje dominante
- Ruby
- Estrellas
- 358
- Forks
- 563
- Merge medio
- 18 h 41 min
- PR fusionados (30 d)
- 2
Descripción
As the name exercise Transpose, the exercise is similar to Matrix exercise, but use character in the matrix cell.
## Discrepancy between test cases, in Kotlin but the issues are for all tracks
- Given 2 rows with uneven length
- The solutions should pad the length to longest length with *space*, and transpose it
- Expected, the transposed chars is a pair of transposed , exactly like `second line longer than first line` where the last pair is " ." , space followed by dot.
- Bugs on first line longer than second line case, where last pair only expected single char.
- Bugs on mixed line length test case as well. The expected transposed chars, should have all 4 characters.
```
@Test
fun `first line longer than second line`() {
val lines = listOf("The fourth line.", "The fifth line.")
val expected = listOf("TT", "hh", "ee", " ", "ff", "oi", "uf", "rt", "th", "h ", " l", "li", "in", "ne", "e.", ".")
assertEquals(expected, Transpose.transpose(lines))
}
@Test
fun `second line longer than first line`() {
val lines = listOf("The first line.", "The second line.")
val expected = listOf("TT", "hh", "ee", " ", "fs", "ie", "rc", "so", "tn", " d", "l ", "il", "ni", "en", ".e", " .")
assertEquals(expected, Transpose.transpose(lines))
}
@Test
fun `mixed line length`() {
val lines = listOf("The longest line.", "A long line.", "A longer line.", "A line.")
val expected = listOf("TAAA", "h ", "elll", " ooi", "lnnn", "ogge", "n e.", "glr", "ei ", "snl", "tei", " .n", "l e", "i .", "n", "e", ".")
assertEquals(expected, Transpose.transpose(lines))
}
```
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Evaluación
Este issue todavía no se ha evaluado.