Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Added @Ignore to the tests #670

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import kotlin.test.Ignore
import kotlin.test.Test
import kotlin.test.assertEquals
import kotlin.test.assertFailsWith
Expand All @@ -7,52 +8,67 @@ class AffineCipherTest {
@Test
fun `encode yes`() = assertEquals("xbt", AffineCipher.encode("yes", 5, 7))

@Ignore
@Test
fun `encode no`() = assertEquals("fu", AffineCipher.encode("no", 15, 18))

@Ignore
@Test
fun `encode OMG`() = assertEquals("lvz", AffineCipher.encode("OMG", 21, 3))

@Ignore
@Test
fun `encode O M G`() = assertEquals("hjp", AffineCipher.encode("O M G", 25, 47))

@Ignore
@Test
fun `encode mindblowingly`() = assertEquals("rzcwa gnxzc dgt", AffineCipher.encode("mindblowingly", 11, 15))

@Ignore
@Test
fun `encode numbers`() = assertEquals("jqgjc rw123 jqgjc rw", AffineCipher.encode("Testing,1 2 3, testing.", 3, 4))

@Ignore
@Test
fun `encode deep thought`() = assertEquals("iynia fdqfb ifje", AffineCipher.encode("Truth is fiction.", 5, 17))

@Ignore
@Test
fun `encode all letters`() = assertEquals("swxtj npvyk lruol iejdc blaxk swxmh qzglf", AffineCipher.encode("The quick brown fox jumps over the lazy dog.", 17, 33))

@Ignore
@Test
fun `encode with a not coprime to m`() {
assertFailsWith<IllegalArgumentException>("a and m must be coprime.") {
AffineCipher.encode("This is a test.", 6, 17)
}
}

@Ignore
@Test
fun `decode exercism`() = assertEquals("exercism", AffineCipher.decode("tytgn fjr", 3, 7))

@Ignore
@Test
fun `decode a sentence`() = assertEquals("anobstacleisoftenasteppingstone", AffineCipher.decode("qdwju nqcro muwhn odqun oppmd aunwd o", 19, 16))

@Ignore
@Test
fun `decode numbers`() = assertEquals("testing123testing", AffineCipher.decode("odpoz ub123 odpoz ub", 25, 7))

@Ignore
@Test
fun `decode all the letters`() = assertEquals("thequickbrownfoxjumpsoverthelazydog", AffineCipher.decode("swxtj npvyk lruol iejdc blaxk swxmh qzglf", 17, 33))

@Ignore
@Test
fun `decode with no spaces in input`() = assertEquals("thequickbrownfoxjumpsoverthelazydog", AffineCipher.decode("swxtjnpvyklruoliejdcblaxkswxmhqzglf", 17, 33))

@Ignore
@Test
fun `decode with too many spaces`() = assertEquals("jollygreengiant", AffineCipher.decode("vszzm cly yd cg qdp", 15, 16))

@Ignore
@Test
fun `decode with a not coprime to m`() {
assertFailsWith<IllegalArgumentException>("a and m must be coprime.") {
Expand Down