Skip to content

Commit ee7c7a3

Browse files
Drop support for symbols as test names due to scala/scala3#6992
1 parent 8709629 commit ee7c7a3

File tree

7 files changed

+20
-21
lines changed

7 files changed

+20
-21
lines changed

utest/src-0/utest/TestBuilder.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,11 @@ trait TestBuilderExtractors given (val qc: QuoteContext) {
7474

7575
// case q"""$p($value).apply($body)""" if checkLhs(p) => (Some(literalValue(value)), body)
7676
// case '{($name: TestableString).apply($body)} => (Some(run(name).value), body.unseal)
77-
case '{($sym: scala.Symbol).apply($body)} => (Some(run(sym).name), body.unseal)
77+
// case '{($sym: scala.Symbol).apply($body)} => (Some(run(sym).name), body.unseal)
7878

7979
// case q"""$p($value).-($body)""" if checkLhs(p) => (Some(literalValue(value)), body)
8080
case '{($name: String).-($body)} => (name.exec, body.unseal)
81-
case '{($sym: scala.Symbol).-($body)} => (Some(run(sym).name), body.unseal)
81+
// case '{($sym: scala.Symbol).-($body)} => (Some(run(sym).name), body.unseal)
8282

8383
// case q"""utest.`package`.test.apply($value).apply($body)""" => (Some(literalValue(value)), body)
8484
case '{utest.test($name: String)($body)} => (name.exec, body.unseal)

utest/src-0/utest/Tests.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ object Tests{
2727
// println(s"In:\n${body.show}")
2828
val bTree = body.unseal
2929
val res = processTests(bTree)
30-
println(s"Out:\n${res.show}\n")
30+
// println(s"Out:\n${res.show}\n")
3131
res
3232
}
3333

utest/src-0/utest/asserts/Tracer.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ object Tracer{
4646
// Don't trace "magic" identifiers with '$'s in them
4747
&& !name.toString.contains('$') =>
4848

49-
println(s"Doing $name")
5049
wrapWithLoggedValue(tree, logger, tree.tpe.widen)
5150

5251
// Don't worry about multiple chained annotations for now...

utest/test/src-0/test/utest/BeforeAfterEachFailureTests.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ object BeforeAfterEachFailureTests extends TestSuite {
2525
} else ()
2626

2727
def tests = Tests {
28-
Symbol("hello") {
28+
test("hello") {
2929
Future(10)
3030
}
3131

32-
Symbol("beforeAfterEachFailures") {
32+
test("beforeAfterEachFailures") {
3333
def tests = Tests {
3434
test("testSuccess"){
3535
Future {

utest/test/src-0/test/utest/FrameworkAsyncTests.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ object FrameworkAsyncTests extends TestSuite {
1010
private val isNative = sys.props("java.vm.name") == "Scala Native"
1111

1212
def tests = Tests {
13-
Symbol("hello") {
13+
test("hello") {
1414
Future(10)
1515
}
1616

17-
Symbol("asyncFailures") {
17+
test("asyncFailures") {
1818
val tests = Tests {
1919
test("testSuccessAsync"){
2020
val p = concurrent.Promise[Int]

utest/test/src-0/test/utest/FrameworkTests.scala

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,13 @@ object FrameworkTests extends utest.TestSuite{
4343
}
4444
test("helloWorldSymbol"){
4545
val tests = Tests{
46-
Symbol("test1"){
46+
test("test1"){
4747
throw new Exception("test1")
4848
}
49-
Symbol("test2"){
49+
test("test2"){
5050
1
5151
}
52-
Symbol("test3"){
52+
test("test3"){
5353
val a = List[Byte](1, 2)
5454
a(10)
5555
}
@@ -58,12 +58,12 @@ object FrameworkTests extends utest.TestSuite{
5858
}
5959
test("helloWorldSymbol2"){
6060
val tests = Tests{
61-
Symbol("test1")-{
61+
test("test1")-{
6262
throw new Exception("test1")
6363
}
64-
Symbol("test2")-1
64+
test("test2")-1
6565

66-
Symbol("test3")-{
66+
test("test3")-{
6767
val a = List[Byte](1, 2)
6868
a(10)
6969
}
@@ -86,7 +86,7 @@ object FrameworkTests extends utest.TestSuite{
8686
e.getMessage
8787
}
8888
}
89-
Symbol("weirdTestName"){
89+
test("weirdTestName"){
9090
val tests = Tests{
9191
"t est1~!@#$%^&*()_+{}|:';<>?,/'"-{
9292
1
@@ -133,7 +133,7 @@ object FrameworkTests extends utest.TestSuite{
133133
}
134134
999
135135
}
136-
Symbol("test3"){
136+
test("test3"){
137137
Seq('a', 'b')
138138
}
139139
}

utest/test/src-0/test/utest/examples/HelloTests.scala

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,19 @@ package test.utest.examples
33
import utest._
44
object HelloTests extends TestSuite{
55
val tests = Tests{
6-
Symbol("test1"){
6+
test("test1"){
77
// throw new Exception("test1")
88
}
9-
Symbol("test2"){
10-
Symbol("inner"){
9+
test("test2"){
10+
test("inner"){
1111
1
1212
}
1313
}
14-
Symbol("test3"){
14+
test("test3"){
1515
val a = List[Byte](1, 2)
1616
// a(10)
1717
}
18-
Symbol("test4"){
18+
test("test4"){
1919
val a = null
2020
a
2121
}

0 commit comments

Comments
 (0)