Skip to content

Commit

Permalink
More failing tests fixed in gentests.
Browse files Browse the repository at this point in the history
  • Loading branch information
cheeseng committed May 4, 2024
1 parent d86d4a3 commit 5cb29c3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class ListShouldContainAtLeastOneOfSpec extends AnyFunSpec {

val fumList: List[String] = List("fum")
val toList: List[String] = List("to")
val ecList: List[String] = List("\u0000fum")
val ecList: List[String] = List("\u0000f")

describe("when used with contain atLeastOneOf (...) syntax") {

Expand Down Expand Up @@ -82,7 +82,7 @@ class ListShouldContainAtLeastOneOfSpec extends AnyFunSpec {
val e1 = intercept[exceptions.TestFailedException] {
ecList should contain atLeastOneOf ("fum", "foe")
}
e1.analysis should be (Vector("LHS contains at least one string with characters that might cause problem, the escaped string: " + prettifier(escapedString("\u0000fum"))))
e1.analysis should be (Vector("LHS contains at least one string with characters that might cause problem, the escaped string: " + prettifier(escapedString("\u0000f"))))
}
}

Expand Down Expand Up @@ -127,7 +127,7 @@ class ListShouldContainAtLeastOneOfSpec extends AnyFunSpec {
val e1 = intercept[exceptions.TestFailedException] {
ecList should (contain atLeastOneOf ("fum", "foe"))
}
e1.analysis should be (Vector("LHS contains at least one string with characters that might cause problem, the escaped string: " + prettifier(escapedString("\u0000fum"))))
e1.analysis should be (Vector("LHS contains at least one string with characters that might cause problem, the escaped string: " + prettifier(escapedString("\u0000f"))))
}
}

Expand Down
8 changes: 7 additions & 1 deletion project/GenContainBase.scala
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ class GenContainBase {
"List\\[Int\\]" -> "scala.collection.mutable.LinkedHashMap[Int, Int]",
"List\\(\\\"fum\\\"\\)" -> "scala.collection.mutable.LinkedHashMap(\"fum\" -> \"fum\")",
"List\\(\\\"\\\\u0000fum\\\"\\)" -> "scala.collection.mutable.LinkedHashMap(\"\\\\u0000fum\" -> \"\\\\u0000fum\")",
"List\\(\\\"\\\\u0000f\\\"\\)" -> "scala.collection.mutable.LinkedHashMap(\"\\\\u0000f\" -> \"\\\\u0000f\")",
"List\\(\\\"to\\\"\\)" -> "scala.collection.mutable.LinkedHashMap(\"to\" -> \"to\")",
"List\\(\\\"fum\\\", \\\"fu\\\"\\)" -> "scala.collection.mutable.LinkedHashMap(\"fum\" -> \"fum\", \"fu\" -> \"fu\")",
"List\\(\\\"\\\\u0000fex\\\", \\\"fum\\\"\\)" -> "scala.collection.mutable.LinkedHashMap(\"\\\\u0000fex\" -> \"\\\\u0000fex\", \"fum\" -> \"fum\")",
Expand Down Expand Up @@ -251,6 +252,7 @@ class GenContainBase {
"\\(\\\"fum\\\", \\\"fum\\\"\\)" -> "(\"fum\" -> \"fum\", \"fum\" -> \"fum\")",
"\\(\\\"fum\\\"\\)" -> "(\"fum\" -> \"fum\")",
"prettifier\\(escapedString\\(\"\\\\u0000fum\\\"\\)\\)" -> "prettifier(escapedString(\"\\\\u0000fum\")) + \" -> \" + prettifier(escapedString(\"\\\\u0000fum\"))",
"prettifier\\(escapedString\\(\"\\\\u0000f\\\"\\)\\)" -> "prettifier(escapedString(\"\\\\u0000f\")) + \" -> \" + prettifier(escapedString(\"\\\\u0000f\"))",
"prettifier\\(escapedString\\(\"\\\\u0000fix\\\"\\)\\)" -> "prettifier(escapedString(\"\\\\u0000fix\")) + \" -> \" + prettifier(escapedString(\"fix\"))",
"prettifier\\(escapedString\\(\"\\\\u0000fex\\\"\\)\\)" -> "prettifier(escapedString(\"\\\\u0000fex\")) + \" -> \" + prettifier(escapedString(\"\\\\u0000fex\"))",
"prettifier\\(escapedString\\(\"\\\\u0000feex\\\"\\)\\)" -> "prettifier(escapedString(\"\\\\u0000feex\")) + \" -> \" + prettifier(escapedString(\"\\\\u0000feex\"))",
Expand Down Expand Up @@ -509,6 +511,7 @@ class GenContainBase {
"List\\[Int\\]" -> "java.util.Map[Int, Int]",
"List\\(\\\"fum\\\"\\)" -> "javaMap(Entry(\"fum\", \"fum\"))",
"List\\(\\\"\\\\u0000fum\\\"\\)" -> "javaMap(Entry(\"\\\\u0000fum\", \"\\\\u0000fum\"))",
"List\\(\\\"\\\\u0000f\\\"\\)" -> "javaMap(Entry(\"\\\\u0000f\", \"\\\\u0000f\"))",
"List\\(\\\"fum\\\", \\\"fu\\\"\\)" -> "javaMap(Entry(\"fum\", \"fum\"), Entry(\"fu\", \"fu\"))",
"List\\(\\\"\\\\u0000fex\\\", \\\"fum\\\"\\)" -> "javaMap(Entry(\"\\\\u0000fex\", \"\\\\u0000fex\"), Entry(\"fum\", \"fum\"))",
"List\\(\\\"to\\\"\\)" -> "javaMap(Entry(\"to\", \"to\"))",
Expand Down Expand Up @@ -556,10 +559,12 @@ class GenContainBase {
"\\(\\\"fum\\\", \\\"fum\\\", \\\"fum\\\"\\)" -> "(Entry(\"fum\", \"fum\"), Entry(\"fum\", \"fum\"), Entry(\"fum\", \"fum\"))",
"\\(\\\"fum\\\"\\)" -> "(Entry(\"fum\", \"fum\"))",
"\\(\\\"\\\\u0000fum\\\"\\)" -> "(Entry(\"\\\\u0000fum\", \"\\\\u0000fum\"))",
"\\(\\\"\\\\u0000f\\\"\\)" -> "(Entry(\"\\\\u0000f\", \"\\\\u0000f\"))",
"\\(\\\"\\\\u0000fex\\\"\\)" -> "(Entry(\"\\\\u0000fex\", \"\\\\u0000fex\"))",
"\\(\\\"\\\\u0000feex\\\"\\)" -> "(Entry(\"\\\\u0000feex\", \"\\\\u0000feex\"))",
"\\(\\\"\\\\u0000fix\\\"\\)" -> "(Entry(\"\\\\u0000fix\", \"\\\\u0000fix\"))",
"escapedString\\(Entry\\(\"\\\\u0000fum\\\", \"\\\\u0000fum\\\"\\)\\)" -> "Entry(prettifier(escapedString(\"\\\\u0000fum\")), prettifier(escapedString(\"\\\\u0000fum\")))",
"escapedString\\(Entry\\(\"\\\\u0000f\\\", \"\\\\u0000f\\\"\\)\\)" -> "Entry(prettifier(escapedString(\"\\\\u0000f\")), prettifier(escapedString(\"\\\\u0000f\")))",
"escapedString\\(Entry\\(\"\\\\u0000fex\\\", \"\\\\u0000fex\\\"\\)\\)" -> "Entry(prettifier(escapedString(\"\\\\u0000fex\")), prettifier(escapedString(\"\\\\u0000fex\")))",
"escapedString\\(Entry\\(\"\\\\u0000feex\\\", \"\\\\u0000feex\\\"\\)\\)" -> "Entry(prettifier(escapedString(\"\\\\u0000feex\")), prettifier(escapedString(\"\\\\u0000feex\")))",
"escapedString\\(Entry\\(\"\\\\u0000fix\\\", \"\\\\u0000fix\\\"\\)\\)" -> "Entry(prettifier(escapedString(\"\\\\u0000fix\")), prettifier(escapedString(\"\\\\u0000fix\")))",
Expand Down Expand Up @@ -884,7 +889,7 @@ class GenContainBase {
"List\\(\\\"nice\\\", \\\"to\\\", \\\"you\\\"\\)" -> "\"noy\"",
"List\\(\\\"hey\\\"\\)" -> "\"e\"",
"List\\(\\\"fum\\\", \\\"foe\\\", \\\"fie\\\", \\\"fee\\\"\\)" -> "\"upie\"",
"List\\(\\\"\\\\u0000fum\\\", \\\"foe\\\", \\\"fie\\\", \\\"fee\\\"\\)" -> "\"\\\\u0000upie\"",
"List\\(\\\"\\\\u0000fum\\\", \\\"foe\\\", \\\"fie\\\", \\\"fee\\\"\\)" -> "\"\\\\u0000u\"",
"List\\(\\\"fum\\\", \\\"fum\\\", \\\"foe\\\", \\\"fie\\\", \\\"fie\\\", \\\"fee\\\"\\)" -> "\"uupiie\"",
"List\\(\\\"fum\\\", \\\"fum\\\", \\\"foe\\\", \\\"fie\\\", \\\"fee\\\", \\\"fee\\\", \\\"fee\\\"\\)" -> "\"uupieee\"",
"List\\(\\\"fum\\\", \\\"fum\\\", \\\"foe\\\", \\\"fie\\\", \\\"fie\\\", \\\"fie\\\", \\\"fee\\\", \\\"fee\\\"\\)" -> "\"uupiiiee\"",
Expand All @@ -907,6 +912,7 @@ class GenContainBase {
"List\\(\\\"happy\\\", \\\"happy\\\", \\\"happy\\\", \\\"birthday\\\", \\\"to\\\", \\\"you\\\", \\\"too\\\"\\)" -> "\"hhhboyz\"",
"List\\(\\\"happy\\\", \\\"happy\\\", \\\"happy\\\", \\\"birthday\\\", \\\"to\\\", \\\"you\\\"\\)" -> "\"hhhboy\"",
"List\\(\\\"\\\\u0000fum\\\"\\)" -> "\"\\\\u0000u\"",
"List\\(\\\"\\\\u0000f\\\"\\)" -> "\"\\\\u0000f\"",
"TempL" -> "ListBuffer",
"\\(\\\"fee\\\", \\\"fie\\\", \\\"foe\\\", \\\"fum\\\"\\)" -> "('e', 'i', 'p', 'u')",
"\\(\\\"fee\\\", \\\"fie\\\", \\\"foe\\\", \\\"fie\\\", \\\"fum\\\"\\)" -> "('e', 'i', 'p', 'i', 'u')",
Expand Down

0 comments on commit 5cb29c3

Please sign in to comment.