-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #536 from adpi2/fix-535
Fix format local method with unloaded parameters + refactor some tests
- Loading branch information
Showing
7 changed files
with
141 additions
and
123 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
modules/tests/src/test/scala/ch/epfl/scala/debugadapter/LocalVariableTests.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package ch.epfl.scala.debugadapter.internal | ||
|
||
import ch.epfl.scala.debugadapter.ScalaVersion | ||
import ch.epfl.scala.debugadapter.testfmk.* | ||
|
||
class LocalVariableTests extends DebugTestSuite { | ||
val scalaVersion = ScalaVersion.`3.1+` | ||
|
||
test("Should set the right expression for array elements") { | ||
val source = | ||
"""|package example | ||
| | ||
|object Main { | ||
| def main(args: Array[String]): Unit = { | ||
| val array = Array(1, 2, 3) | ||
| println("ok") | ||
| } | ||
|}""".stripMargin | ||
implicit val debuggee: TestingDebuggee = TestingDebuggee.mainClass(source, "example.Main", scalaVersion) | ||
val regexp = """array\(\d+\)""".r | ||
check( | ||
Breakpoint(6), | ||
LocalVariable.inspect("array")( | ||
_.forall(v => """array\(\d+\)""".r.unapplySeq(v.evaluateName).isDefined) | ||
) | ||
) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 0 additions & 43 deletions
43
...es/tests/src/test/scala/ch/epfl/scala/debugadapter/internal/VariableEvaluationTests.scala
This file was deleted.
Oops, something went wrong.