From 86c77872ab314fa2404cce2116cc2e86967a21eb Mon Sep 17 00:00:00 2001 From: Ric Emery Date: Mon, 5 Feb 2018 11:14:40 -0700 Subject: [PATCH] Update AcronymTest to the 1.3 canonical data. Refs #488 --- .../acronym/src/test/scala/AcronymTest.scala | 18 ++++++------------ .../src/main/scala/AcronymTestGenerator.scala | 2 +- 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/exercises/acronym/src/test/scala/AcronymTest.scala b/exercises/acronym/src/test/scala/AcronymTest.scala index a7cd6f655..e2ac6ed95 100644 --- a/exercises/acronym/src/test/scala/AcronymTest.scala +++ b/exercises/acronym/src/test/scala/AcronymTest.scala @@ -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") } diff --git a/testgen/src/main/scala/AcronymTestGenerator.scala b/testgen/src/main/scala/AcronymTestGenerator.scala index e8cc5a43e..7a36408bd 100644 --- a/testgen/src/main/scala/AcronymTestGenerator.scala +++ b/testgen/src/main/scala/AcronymTestGenerator.scala @@ -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"-------------")