Skip to content

Commit b347dbe

Browse files
authored
Merge pull request #40 from dwijnand/minimise-scala-2.12
Minimise tests restricted to 2.12-only
2 parents 3078602 + 0584d78 commit b347dbe

File tree

12 files changed

+74
-45
lines changed

12 files changed

+74
-45
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/*
2+
rule = fix.scala213.Core
3+
*/
4+
package fix.scala213
5+
6+
object Console212 {
7+
def consoleReadBoolean = Console.readBoolean()
8+
def consoleReadByte = Console.readByte()
9+
def consoleReadChar = Console.readChar()
10+
def consoleReadDouble = Console.readDouble()
11+
def consoleReadFloat = Console.readFloat()
12+
def consoleReadInt = Console.readInt()
13+
def consoleReadLine = Console.readLine()
14+
def consoleReadLine(text: String, args: Any*) = Console.readLine(text, args: _*)
15+
def consoleReadLong = Console.readLong()
16+
def consoleReadShort = Console.readShort()
17+
def consoleReadf(format: String) = Console.readf(format)
18+
def consoleReadf1(format: String) = Console.readf1(format)
19+
def consoleReadf2(format: String) = Console.readf2(format)
20+
def consoleReadf3(format: String) = Console.readf3(format)
21+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/*
2+
rule = fix.scala213.NullaryHashHash
3+
*/
4+
package fix.scala213
5+
6+
object NullaryHashHash212 {
7+
("": Any).##()
8+
("": AnyRef).##()
9+
("": Object).##()
10+
("": String).##()
11+
"".##()
12+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/*
2+
rule = fix.scala213.Varargs
3+
*/
4+
package fix.scala213
5+
6+
class Varargs212 {
7+
def foo(xs: scala.collection.Seq[String]) = List(xs: _*)
8+
}

input/src/test/scala-2.12/fix/scala213/Core.scala renamed to input/src/test/scala/fix/scala213/Core.scala

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -24,21 +24,6 @@ object Core {
2424
def arrayCopy2() = Platform.arraycopy(null, 0, null, 0, 0)
2525
def arrayCopy3() = scala.compat.Platform.arraycopy(null, 0, null, 0, 0)
2626

27-
def consoleReadBoolean = Console.readBoolean()
28-
def consoleReadByte = Console.readByte()
29-
def consoleReadChar = Console.readChar()
30-
def consoleReadDouble = Console.readDouble()
31-
def consoleReadFloat = Console.readFloat()
32-
def consoleReadInt = Console.readInt()
33-
def consoleReadLine = Console.readLine()
34-
def consoleReadLine(text: String, args: Any*) = Console.readLine(text, args: _*)
35-
def consoleReadLong = Console.readLong()
36-
def consoleReadShort = Console.readShort()
37-
def consoleReadf(format: String) = Console.readf(format)
38-
def consoleReadf1(format: String) = Console.readf1(format)
39-
def consoleReadf2(format: String) = Console.readf2(format)
40-
def consoleReadf3(format: String) = Console.readf3(format)
41-
4227
def arrow1: PartialFunction[Any, String] = {
4328
case 0 => "zero"
4429
case 1 "one"

input/src/test/scala-2.12/fix/scala213/NullaryHashHash.scala renamed to input/src/test/scala/fix/scala213/NullaryHashHash.scala

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,6 @@ rule = fix.scala213.NullaryHashHash
44
package fix.scala213
55

66
object NullaryHashHash {
7-
("": Any).##()
8-
("": AnyRef).##()
9-
("": Object).##()
10-
("": String).##()
11-
"".##()
12-
137
("": Any).##
148
("": AnyRef).##
159
("": Object).##

input/src/test/scala-2.12/fix/scala213/Varargs.scala renamed to input/src/test/scala/fix/scala213/Varargs.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ rule = fix.scala213.Varargs
44
package fix.scala213
55

66
class Varargs {
7-
def foo(xs: scala.collection.Seq[String]) = List(xs: _*)
87
def bar = List(List(1,2,3): _*)
98
def baz = List(scala.Seq(1,2,3): _*)
109
// TODO
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
package fix.scala213
2+
3+
import scala.io.StdIn
4+
object Console212 {
5+
def consoleReadBoolean = StdIn.readBoolean()
6+
def consoleReadByte = StdIn.readByte()
7+
def consoleReadChar = StdIn.readChar()
8+
def consoleReadDouble = StdIn.readDouble()
9+
def consoleReadFloat = StdIn.readFloat()
10+
def consoleReadInt = StdIn.readInt()
11+
def consoleReadLine = StdIn.readLine()
12+
def consoleReadLine(text: String, args: Any*) = StdIn.readLine(text, args: _*)
13+
def consoleReadLong = StdIn.readLong()
14+
def consoleReadShort = StdIn.readShort()
15+
def consoleReadf(format: String) = StdIn.readf(format)
16+
def consoleReadf1(format: String) = StdIn.readf1(format)
17+
def consoleReadf2(format: String) = StdIn.readf2(format)
18+
def consoleReadf3(format: String) = StdIn.readf3(format)
19+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package fix.scala213
2+
3+
object NullaryHashHash212 {
4+
("": Any).##
5+
("": AnyRef).##
6+
("": Object).##
7+
("": String).##
8+
"".##
9+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package fix.scala213
2+
3+
class Varargs212 {
4+
def foo(xs: scala.collection.Seq[String]) = List(xs.toSeq: _*)
5+
}

output/src/test/scala/fix/scala213/Core.scala

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package fix.scala213
22

33
import scala.compat.Platform
4-
import scala.io.StdIn
54

65
object Core {
76
def eol1 = "Hello World!" + System.lineSeparator
@@ -21,21 +20,6 @@ object Core {
2120
def arrayCopy2() = System.arraycopy(null, 0, null, 0, 0)
2221
def arrayCopy3() = System.arraycopy(null, 0, null, 0, 0)
2322

24-
def consoleReadBoolean = StdIn.readBoolean()
25-
def consoleReadByte = StdIn.readByte()
26-
def consoleReadChar = StdIn.readChar()
27-
def consoleReadDouble = StdIn.readDouble()
28-
def consoleReadFloat = StdIn.readFloat()
29-
def consoleReadInt = StdIn.readInt()
30-
def consoleReadLine = StdIn.readLine()
31-
def consoleReadLine(text: String, args: Any*) = StdIn.readLine(text, args: _*)
32-
def consoleReadLong = StdIn.readLong()
33-
def consoleReadShort = StdIn.readShort()
34-
def consoleReadf(format: String) = StdIn.readf(format)
35-
def consoleReadf1(format: String) = StdIn.readf1(format)
36-
def consoleReadf2(format: String) = StdIn.readf2(format)
37-
def consoleReadf3(format: String) = StdIn.readf3(format)
38-
3923
def arrow1: PartialFunction[Any, String] = {
4024
case 0 => "zero"
4125
case 1 => "one"

0 commit comments

Comments
 (0)