Skip to content

Commit

Permalink
Fix broken tests
Browse files Browse the repository at this point in the history
  • Loading branch information
grzegorz-bielski committed Jul 14, 2024
1 parent c2c6297 commit 00217d6
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 31 deletions.
2 changes: 1 addition & 1 deletion tests/example-empty-file/expected_results.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"message":"/solution/src/test/scala/ExampleEmptyFileTest.scala:8: error: not found: value Leap\n Leap.leapYear(2015) should be (false)\n ^\n/solution/src/test/scala/ExampleEmptyFileTest.scala:13: error: not found: value Leap\n Leap.leapYear(1996) should be (true)\n ^\n/solution/src/test/scala/ExampleEmptyFileTest.scala:18: error: not found: value Leap\n Leap.leapYear(2100) should be (false)\n ^\n/solution/src/test/scala/ExampleEmptyFileTest.scala:23: error: not found: value Leap\n Leap.leapYear(2000) should be (true)\n ^\n4 errors\n","version":2,"status":"error"}
{"message":"\u001b[31m\u001b[31m-- [E006] Not Found Error: /solution/src/test/scala/ExampleEmptyFileTest.scala:8:4 \u001b[0m\u001b[0m\n\u001b[31m8 |\u001b[0m Leap.leapYear(\u001b[31m2015\u001b[0m) should be (\u001b[31mfalse\u001b[0m)\n\u001b[31m\u001b[31m |\u001b[0m ^^^^\u001b[0m\n\u001b[31m |\u001b[0m Not found: Leap - did you mean trap?\n\u001b[31m |\u001b[0m\n\u001b[31m |\u001b[0m longer explanation available when compiling with `-explain`\n\u001b[31m\u001b[31m-- [E006] Not Found Error: /solution/src/test/scala/ExampleEmptyFileTest.scala:13:4 \u001b[0m\u001b[0m\n\u001b[31m13 |\u001b[0m Leap.leapYear(\u001b[31m1996\u001b[0m) should be (\u001b[31mtrue\u001b[0m)\n\u001b[31m\u001b[31m |\u001b[0m ^^^^\u001b[0m\n\u001b[31m |\u001b[0m Not found: Leap - did you mean trap?\n\u001b[31m |\u001b[0m\n\u001b[31m |\u001b[0m longer explanation available when compiling with `-explain`\n\u001b[31m\u001b[31m-- [E006] Not Found Error: /solution/src/test/scala/ExampleEmptyFileTest.scala:18:4 \u001b[0m\u001b[0m\n\u001b[31m18 |\u001b[0m Leap.leapYear(\u001b[31m2100\u001b[0m) should be (\u001b[31mfalse\u001b[0m)\n\u001b[31m\u001b[31m |\u001b[0m ^^^^\u001b[0m\n\u001b[31m |\u001b[0m Not found: Leap - did you mean trap?\n\u001b[31m |\u001b[0m\n\u001b[31m |\u001b[0m longer explanation available when compiling with `-explain`\n\u001b[31m\u001b[31m-- [E006] Not Found Error: /solution/src/test/scala/ExampleEmptyFileTest.scala:23:4 \u001b[0m\u001b[0m\n\u001b[31m23 |\u001b[0m Leap.leapYear(\u001b[31m2000\u001b[0m) should be (\u001b[31mtrue\u001b[0m)\n\u001b[31m\u001b[31m |\u001b[0m ^^^^\u001b[0m\n\u001b[31m |\u001b[0m Not found: Leap - did you mean trap?\n\u001b[31m |\u001b[0m\n\u001b[31m |\u001b[0m longer explanation available when compiling with `-explain`\n\u001b[33m\u001b[33m-- Warning: /solution/src/test/scala/ExampleEmptyFileTest.scala:8:24 -------\u001b[0m\u001b[0m\n\u001b[33m8 |\u001b[0m Leap.leapYear(\u001b[31m2015\u001b[0m) should be (\u001b[31mfalse\u001b[0m)\n\u001b[33m\u001b[33m |\u001b[0m ^^^^^^\u001b[0m\n\u001b[33m |\u001b[0mAlphanumeric method should is not declared \u001b[33minfix\u001b[0m; it should not be used as infix operator.\n\u001b[33m |\u001b[0mInstead, use method syntax .should(...) or backticked identifier `should`.\n\u001b[33m |\u001b[0mThe latter can be rewritten automatically under -rewrite -source 3.4-migration.\n\u001b[33m\u001b[33m-- Warning: /solution/src/test/scala/ExampleEmptyFileTest.scala:13:24 ------\u001b[0m\u001b[0m\n\u001b[33m13 |\u001b[0m Leap.leapYear(\u001b[31m1996\u001b[0m) should be (\u001b[31mtrue\u001b[0m)\n\u001b[33m\u001b[33m |\u001b[0m ^^^^^^\u001b[0m\n\u001b[33m |\u001b[0mAlphanumeric method should is not declared \u001b[33minfix\u001b[0m; it should not be used as infix operator.\n\u001b[33m |\u001b[0mInstead, use method syntax .should(...) or backticked identifier `should`.\n\u001b[33m |\u001b[0mThe latter can be rewritten automatically under -rewrite -source 3.4-migration.\n\u001b[33m\u001b[33m-- Warning: /solution/src/test/scala/ExampleEmptyFileTest.scala:18:24 ------\u001b[0m\u001b[0m\n\u001b[33m18 |\u001b[0m Leap.leapYear(\u001b[31m2100\u001b[0m) should be (\u001b[31mfalse\u001b[0m)\n\u001b[33m\u001b[33m |\u001b[0m ^^^^^^\u001b[0m\n\u001b[33m |\u001b[0mAlphanumeric method should is not declared \u001b[33minfix\u001b[0m; it should not be used as infix operator.\n\u001b[33m |\u001b[0mInstead, use method syntax .should(...) or backticked identifier `should`.\n\u001b[33m |\u001b[0mThe latter can be rewritten automatically under -rewrite -source 3.4-migration.\n\u001b[33m\u001b[33m-- Warning: /solution/src/test/scala/ExampleEmptyFileTest.scala:23:24 ------\u001b[0m\u001b[0m\n\u001b[33m23 |\u001b[0m Leap.leapYear(\u001b[31m2000\u001b[0m) should be (\u001b[31mtrue\u001b[0m)\n\u001b[33m\u001b[33m |\u001b[0m ^^^^^^\u001b[0m\n\u001b[33m |\u001b[0mAlphanumeric method should is not declared \u001b[33minfix\u001b[0m; it should not be used as infix operator.\n\u001b[33m |\u001b[0mInstead, use method syntax .should(...) or backticked identifier `should`.\n\u001b[33m |\u001b[0mThe latter can be rewritten automatically under -rewrite -source 3.4-migration.\n4 warnings found\n4 errors found\n","version":2,"status":"error"}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import java.time.LocalDate

import monocle.Lens
import monocle.syntax.all._
import monocle.macros.syntax.lens._
import monocle.macros.GenLens

object ExampleLensPerson {
Expand Down
29 changes: 1 addition & 28 deletions tests/example-multiple-tests/expected_results.json
Original file line number Diff line number Diff line change
@@ -1,28 +1 @@
{
"tests": [
{
"output": null,
"name": "two-one",
"test_code": null,
"message": null,
"status": "pass"
},
{
"output": null,
"name": "one-one",
"test_code": null,
"message": null,
"status": "pass"
},
{
"output": null,
"name": "one-two",
"test_code": null,
"message": null,
"status": "pass"
}
],
"message": null,
"version": 2,
"status": "pass"
}
{"tests":[{"output":null,"name":"one-one","test_code":null,"message":null,"status":"pass"},{"output":null,"name":"two-one","test_code":null,"message":null,"status":"pass"},{"output":null,"name":"one-two","test_code":null,"message":null,"status":"pass"}],"message":null,"version":2,"status":"pass"}
2 changes: 1 addition & 1 deletion tests/example-syntax-error/expected_results.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"message":"/solution/src/main/scala/ExampleSyntaxError.scala:1: error: expected class or object definition\nobjeTTTWE @#Leap\n^\n1 error\n","version":2,"status":"error"}
{"message":"\u001b[31m\u001b[31m-- [E103] Syntax Error: /solution/src/main/scala/ExampleSyntaxError.scala:1:0 \u001b[0m\u001b[0m\n\u001b[31m1 |\u001b[0mobjeTTTWE @#Leap\n\u001b[31m\u001b[31m |\u001b[0m^^^^^^^^^\u001b[0m\n\u001b[31m |\u001b[0mIllegal start of toplevel definition\n\u001b[31m |\u001b[0m\n\u001b[31m |\u001b[0m longer explanation available when compiling with `-explain`\n\u001b[31m\u001b[31m-- [E006] Not Found Error: /solution/src/test/scala/ExampleSyntaxErrorTest.scala:8:4 \u001b[0m\u001b[0m\n\u001b[31m8 |\u001b[0m Leap.leapYear(\u001b[31m2015\u001b[0m) should be (\u001b[31mfalse\u001b[0m)\n\u001b[31m\u001b[31m |\u001b[0m ^^^^\u001b[0m\n\u001b[31m |\u001b[0m Not found: Leap - did you mean trap?\n\u001b[31m |\u001b[0m\n\u001b[31m |\u001b[0m longer explanation available when compiling with `-explain`\n\u001b[31m\u001b[31m-- [E006] Not Found Error: /solution/src/test/scala/ExampleSyntaxErrorTest.scala:13:4 \u001b[0m\u001b[0m\n\u001b[31m13 |\u001b[0m Leap.leapYear(\u001b[31m1996\u001b[0m) should be (\u001b[31mtrue\u001b[0m)\n\u001b[31m\u001b[31m |\u001b[0m ^^^^\u001b[0m\n\u001b[31m |\u001b[0m Not found: Leap - did you mean trap?\n\u001b[31m |\u001b[0m\n\u001b[31m |\u001b[0m longer explanation available when compiling with `-explain`\n\u001b[31m\u001b[31m-- [E006] Not Found Error: /solution/src/test/scala/ExampleSyntaxErrorTest.scala:18:4 \u001b[0m\u001b[0m\n\u001b[31m18 |\u001b[0m Leap.leapYear(\u001b[31m2100\u001b[0m) should be (\u001b[31mfalse\u001b[0m)\n\u001b[31m\u001b[31m |\u001b[0m ^^^^\u001b[0m\n\u001b[31m |\u001b[0m Not found: Leap - did you mean trap?\n\u001b[31m |\u001b[0m\n\u001b[31m |\u001b[0m longer explanation available when compiling with `-explain`\n\u001b[31m\u001b[31m-- [E006] Not Found Error: /solution/src/test/scala/ExampleSyntaxErrorTest.scala:23:4 \u001b[0m\u001b[0m\n\u001b[31m23 |\u001b[0m Leap.leapYear(\u001b[31m2000\u001b[0m) should be (\u001b[31mtrue\u001b[0m)\n\u001b[31m\u001b[31m |\u001b[0m ^^^^\u001b[0m\n\u001b[31m |\u001b[0m Not found: Leap - did you mean trap?\n\u001b[31m |\u001b[0m\n\u001b[31m |\u001b[0m longer explanation available when compiling with `-explain`\n\u001b[33m\u001b[33m-- Warning: /solution/src/test/scala/ExampleSyntaxErrorTest.scala:8:24 -----\u001b[0m\u001b[0m\n\u001b[33m8 |\u001b[0m Leap.leapYear(\u001b[31m2015\u001b[0m) should be (\u001b[31mfalse\u001b[0m)\n\u001b[33m\u001b[33m |\u001b[0m ^^^^^^\u001b[0m\n\u001b[33m |\u001b[0mAlphanumeric method should is not declared \u001b[33minfix\u001b[0m; it should not be used as infix operator.\n\u001b[33m |\u001b[0mInstead, use method syntax .should(...) or backticked identifier `should`.\n\u001b[33m |\u001b[0mThe latter can be rewritten automatically under -rewrite -source 3.4-migration.\n\u001b[33m\u001b[33m-- Warning: /solution/src/test/scala/ExampleSyntaxErrorTest.scala:13:24 ----\u001b[0m\u001b[0m\n\u001b[33m13 |\u001b[0m Leap.leapYear(\u001b[31m1996\u001b[0m) should be (\u001b[31mtrue\u001b[0m)\n\u001b[33m\u001b[33m |\u001b[0m ^^^^^^\u001b[0m\n\u001b[33m |\u001b[0mAlphanumeric method should is not declared \u001b[33minfix\u001b[0m; it should not be used as infix operator.\n\u001b[33m |\u001b[0mInstead, use method syntax .should(...) or backticked identifier `should`.\n\u001b[33m |\u001b[0mThe latter can be rewritten automatically under -rewrite -source 3.4-migration.\n\u001b[33m\u001b[33m-- Warning: /solution/src/test/scala/ExampleSyntaxErrorTest.scala:18:24 ----\u001b[0m\u001b[0m\n\u001b[33m18 |\u001b[0m Leap.leapYear(\u001b[31m2100\u001b[0m) should be (\u001b[31mfalse\u001b[0m)\n\u001b[33m\u001b[33m |\u001b[0m ^^^^^^\u001b[0m\n\u001b[33m |\u001b[0mAlphanumeric method should is not declared \u001b[33minfix\u001b[0m; it should not be used as infix operator.\n\u001b[33m |\u001b[0mInstead, use method syntax .should(...) or backticked identifier `should`.\n\u001b[33m |\u001b[0mThe latter can be rewritten automatically under -rewrite -source 3.4-migration.\n\u001b[33m\u001b[33m-- Warning: /solution/src/test/scala/ExampleSyntaxErrorTest.scala:23:24 ----\u001b[0m\u001b[0m\n\u001b[33m23 |\u001b[0m Leap.leapYear(\u001b[31m2000\u001b[0m) should be (\u001b[31mtrue\u001b[0m)\n\u001b[33m\u001b[33m |\u001b[0m ^^^^^^\u001b[0m\n\u001b[33m |\u001b[0mAlphanumeric method should is not declared \u001b[33minfix\u001b[0m; it should not be used as infix operator.\n\u001b[33m |\u001b[0mInstead, use method syntax .should(...) or backticked identifier `should`.\n\u001b[33m |\u001b[0mThe latter can be rewritten automatically under -rewrite -source 3.4-migration.\n4 warnings found\n5 errors found\n","version":2,"status":"error"}

0 comments on commit 00217d6

Please sign in to comment.