-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Test UX in continuous integration #17784
-
It would be nice if vulpix revealed the failed diff. (It performs a diff and not a simple strcmp.)
For this test suite or group below, there is no indication which "script" file failed.
It would be superlative to summarize at the end, as opposed to scrolling back through output.
I think a differentiating char in the first column is easier to scan for, if I must scan:
!!! expected =========>
Even better in red.
Sample output:
[info] Test dotty.tools.repl.ScriptedTests.replTests started
expected =========>
// scalac: -source:future -deprecation
scala> type M[X] = X match { case Int => String case _ => Int }
1 warning found
-- Deprecation Warning: --------------------------------------------------------
1 | type M[X] = X match { case Int => String case _ => Int }
| ^
| `_` is deprecated for wildcard arguments of types: use `?` instead
scala> type N[X] = X match { case List[_] => Int }
1 warning found
-- Deprecation Warning: --------------------------------------------------------
1 | type N[X] = X match { case List[_] => Int }
| ^
| `_` is deprecated for wildcard arguments of types: use `?` instead
actual ===========>
// scalac: -source:future -deprecation
scala> type M[X] = X match { case Int => String case _ => Int }
scala> type N[X] = X match { case List[_] => Int }
1 warning found
-- Deprecation Warning: --------------------------------------------------------
1 | type N[X] = X match { case List[_] => Int }
| ^
| `_` is deprecated for wildcard arguments of types: use `?` instead
Error: Test dotty.tools.repl.ScriptedTests.replTests failed: java.lang.AssertionError: Error in script /__w/dotty/dotty/out/bootstrap/scala3-compiler-bootstrapped/scala-3.1.2-RC1-bin-SNAPSHOT-nonbootstrapped/test-classes/repl/i13208.scala, expected output did not match actual, took 8.573 sec
Error: at dotty.tools.repl.ReplTest.testScript(ReplTest.scala:97)
Error: at dotty.tools.repl.ReplTest.testFile(ReplTest.scala:42)
Error: at dotty.tools.repl.ScriptedTests.replTests$$anonfun1ドル(ScriptedTests.scala:11)
Error: at scala.runtime.function.JProcedure1.apply(JProcedure1.java:15)
Error: at scala.runtime.function.JProcedure1.apply(JProcedure1.java:10)
Error: at scala.collection.ArrayOps$.foreach$extension(ArrayOps.scala:1328)
Error: at dotty.tools.repl.ScriptedTests.replTests(ScriptedTests.scala:11)
Error: at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Error: at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
Error: at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
Error: at java.lang.reflect.Method.invoke(Method.java:567)
Error: ...
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 3 comments 2 replies
-
Similarly, a list of line numbers would be more helpful as a diff. Show me the wrongness.
Wrong number of errors encountered when compiling out/compileNeg/neg/f-interpolator-neg
expected: 46, actual: 49 -> following the errors:
at 80: Missing conversion operator in '%'; use %% for literal %, %n for newline
at 79: Missing conversion operator in '%'; use %% for literal %, %n for newline
at 79: Missing conversion operator in '%2'; use %% for literal %, %n for newline
at 78: illegal conversion character 'i'
[snip]
Beta Was this translation helpful? Give feedback.
All reactions
-
It shows unfulfilled expectations now.
Beta Was this translation helpful? Give feedback.
All reactions
-
I just spent way too long trying to move a caret. The caret or the stick?
-- Error: tests/neg/f-interpolator-tests.scala:10:10 -------------------------------------------------------------------
10 | f"x % y = ${x % y}%d" // error: illegal conversion character 'y'
^^^^
illegal conversion character 'y'
"actual output":
-- Error: tests/neg/f-interpolator-tests.scala:10:10 -------------------------------------------------------------------
10 | f"x % y = ${x % y}%d" // error: illegal conversion character 'y'
| ^^^^
| illegal conversion character 'y'
the VBAR indent is missing in the sbt output.
Beta Was this translation helpful? Give feedback.
All reactions
-
You mean the caret or the shtick.
Beta Was this translation helpful? Give feedback.
All reactions
-
though maybe if every line differs then don't bother.
Beta Was this translation helpful? Give feedback.