Skip to content

Commit 92232be

Browse files
committed
slightly cleaner tests
1 parent 50e17d1 commit 92232be

File tree

5 files changed

+10
-13
lines changed

5 files changed

+10
-13
lines changed

Diff for: compiler/test-resources/jars/MyLibrary.scala

+4-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
// MyLibrary.scala
1+
/**
2+
* JAR used for testing repl :require
3+
* Generated using: mkdir out; scalac -d out MyLibrary.scala; jar cf mylibrary.jar -C out .
4+
*/
25
package mylibrary
36

47
object Utils:
58
def greet(name: String): String = s"Hello, $name!"
6-
7-
class Calculator:
8-
def add(x: Int, y: Int): Int = x + y
9-
def subtract(x: Int, y: Int): Int = x - y
10-

Diff for: compiler/test-resources/jars/MyLibrary2.scala

+5-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
// MyLibrary2.scala
1+
/**
2+
* JAR used for testing repl :require
3+
* Generated using: mkdir out2; scalac -d out MyLibrary2.scala; jar cf mylibrary2.jar -C out2 .
4+
*/
25
package mylibrary2
36

47
object Utils2:
5-
def greet(name: String): String = s"Hello, $name!"
6-
7-
class Calculator2:
8-
def add(x: Int, y: Int): Int = x + y
9-
def subtract(x: Int, y: Int): Int = x - y
8+
def greet(name: String): String = s"Greetings, $name!"
109

Diff for: compiler/test-resources/jars/mylibrary.jar

-1.06 KB
Binary file not shown.

Diff for: compiler/test-resources/jars/mylibrary2.jar

-1.07 KB
Binary file not shown.

Diff for: compiler/test-resources/repl/require-multiple

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Added 'compiler/test-resources/jars/mylibrary2.jar' to classpath.
1515
scala> import mylibrary2.Utils2
1616

1717
scala> Utils2.greet("Alice")
18-
val res1: String = Hello, Alice!
18+
val res1: String = Greetings, Alice!
1919

2020
scala> Utils.greet("Alice")
2121
val res2: String = Hello, Alice!

0 commit comments

Comments
 (0)