Skip to content

Commit 665fc74

Browse files
committed
Move test to run/ directory
1 parent 737ae96 commit 665fc74

File tree

2 files changed

+31
-10
lines changed

2 files changed

+31
-10
lines changed

tests/pos/publicInBinary.scala renamed to tests/run/publicInBinary/Lib_1.scala

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,6 @@ class Baz() extends Foo(4, 4):
4040
class Qux() extends Foo(5, 5):
4141
inline def qux: Int = protectedVal + packagePrivateVal
4242

43-
def test =
44-
Foo(3, 3).foo
45-
Bar().bar
46-
Baz().baz
47-
Qux().qux
4843

4944
@publicInBinary given Int = 1
5045
@publicInBinary given (using Double): Int = 1
@@ -78,9 +73,9 @@ package foo {
7873
@publicInBinary private[foo] def x: Int = 1
7974
inline def f: Int = Foo.x
8075
}
81-
def testFoo = foo.f
76+
def testFoo() = foo.f
8277

83-
def localTest =
78+
def localTest() =
8479
class Foo:
8580
@publicInBinary private[Foo] val a: Int = 1
8681
@publicInBinary protected val b: Int = 1
@@ -112,10 +107,10 @@ package traits {
112107

113108
trait Foo:
114109
inline def foo: Any = bar
115-
@publicInBinary private[Foo] def bar: Any = ???
110+
@publicInBinary private[Foo] def bar: Any = 2
116111
end Foo
117112

118-
def test =
113+
def test() =
119114
Baz.foo
120115
(new Baz).foo
121116
val baz = new Baz
@@ -134,7 +129,7 @@ package constructors {
134129
inline def newFoo(x: Int, y: Int) = new Foo(x, y)
135130
}
136131

137-
def testConstructors =
132+
def testConstructors() =
138133
val f = constructors.newFoo(1)
139134
val g = constructors.newFoo(1, 2)
140135
val h = new constructors.Bar(1).bar

tests/run/publicInBinary/Test_2.scala

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import foo.*
2+
3+
@main def Test: Unit =
4+
val foo: Foo = new Foo(1, 2)
5+
foo.foo
6+
7+
val bar = new Bar()
8+
bar.foo
9+
bar.bar
10+
11+
val baz = new Baz()
12+
baz.foo
13+
baz.baz
14+
15+
val qux = new Qux()
16+
qux.foo
17+
qux.qux
18+
19+
val c = new inlines.TestPassing
20+
c.foo(1)
21+
c.bar(2)
22+
23+
testFoo()
24+
localTest()
25+
traits.test()
26+
testConstructors()

0 commit comments

Comments
 (0)