Created
September 23, 2019 12:57
-
-
Save JustDravee/e44f1a8f288673af8fe7b85be18043a3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:interview_algorithms_dart/palindrome-le-plus-long.dart'; | |
import 'package:test/test.dart'; | |
void main() { | |
test("Chaîne vide", () { | |
expect(palindromeLePlusLong(""), ""); | |
}); | |
test("Chaîne entière", () { | |
expect(palindromeLePlusLong("lol"), "lol"); | |
}); | |
test("Caractère unique", () { | |
expect(palindromeLePlusLong("a"), "a"); | |
}); | |
test("Phrase avec espaces, majuscule et ponctuation au milieu", () { | |
expect(palindromeLePlusLong("No lemon, no melon"), "No lemon, no melon"); | |
}); | |
test("Palindrome pair", () { | |
expect(palindromeLePlusLong("abba"), "abba"); | |
}); | |
test("Palindrome impair", () { | |
expect(palindromeLePlusLong("aba"), "aba"); | |
}); | |
test("Palindrome répété", () { | |
expect(palindromeLePlusLong("lolablol"), "lol"); | |
}); | |
test("Deux palindromes", () { | |
expect(palindromeLePlusLong("lolroxxxor"), "roxxxor"); | |
}); | |
test("Début de chaîne", () { | |
expect(palindromeLePlusLong("lolahbon"), "lol"); | |
}); | |
test("Milieu de chaîne", () { | |
expect(palindromeLePlusLong("ahlolserieux"), "lol"); | |
}); | |
test("Fin de chaîne", () { | |
expect(palindromeLePlusLong("superlol"), "lol"); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment