Skip to content

Commit

Permalink
Update AcronymTest to the 1.3 canonical data.
Browse files Browse the repository at this point in the history
  • Loading branch information
ricemery committed Feb 5, 2018
1 parent cc89b30 commit 86c7787
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
18 changes: 6 additions & 12 deletions exercises/acronym/src/test/scala/AcronymTest.scala
Original file line number Diff line number Diff line change
@@ -1,34 +1,28 @@

import org.scalatest.{Matchers, FunSuite}

/** @version 1.1.0 */
/** @version 1.3.0 */
class AcronymTest extends FunSuite with Matchers {

test("basic") {
test("basic") {
Acronym.abbreviate("Portable Network Graphics") should be ("PNG")
}

test("lowercase words") {
test("lowercase words") {
pending
Acronym.abbreviate("Ruby on Rails") should be ("ROR")
}

test("punctuation") {
test("punctuation") {
pending
Acronym.abbreviate("First In, First Out") should be ("FIFO")
}

test("all caps words") {
pending
Acronym.abbreviate("PHP: Hypertext Preprocessor") should be ("PHP")
}

test("non-acronym all caps word") {
test("all caps word") {
pending
Acronym.abbreviate("GNU Image Manipulation Program") should be ("GIMP")
}

test("hyphenated") {
test("punctuation without whitespace") {
pending
Acronym.abbreviate("Complementary metal-oxide semiconductor") should be ("CMOS")
}
Expand Down
2 changes: 1 addition & 1 deletion testgen/src/main/scala/AcronymTestGenerator.scala
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ object AcronymTestGenerator {
def main(args: Array[String]): Unit = {
val file = new File("src/main/resources/acronym.json")

val code = TestSuiteBuilder.build(file, fromLabeledTest("phrase"))
val code = TestSuiteBuilder.build(file, fromLabeledTestFromInput("phrase"))
println(s"-------------")
println(code)
println(s"-------------")
Expand Down

0 comments on commit 86c7787

Please sign in to comment.