Skip to content

Commit 32ac8be

Browse files
committed
update expect tests for semanticdb
1 parent 36b475c commit 32ac8be

File tree

3 files changed

+53
-52
lines changed

3 files changed

+53
-52
lines changed

tests/semanticdb/expect/Enums.expect.scala

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ object Enums/*<-_empty_::Enums.*/ with
1212
case Hearts/*<-_empty_::Enums.Suits.Hearts.*/, Spades/*<-_empty_::Enums.Suits.Spades.*/, Clubs/*<-_empty_::Enums.Suits.Clubs.*/, Diamonds/*<-_empty_::Enums.Suits.Diamonds.*/
1313

1414
object Suits/*<-_empty_::Enums.Suits.*/ with
15-
def (suit/*<-_empty_::Enums.Suits.isRed().*//*<-_empty_::Enums.Suits.isRed().(suit)*/: Suits/*->_empty_::Enums.Suits#*/) isRed: Boolean/*->scala::Boolean#*/ =
15+
def (suit/*<-_empty_::Enums.Suits.isRed().*//*<-_empty_::Enums.Suits.isRed().(suit)*/: Suits/*->_empty_::Enums.Suits#*/).isRed: Boolean/*->scala::Boolean#*/ =
1616
suit/*->_empty_::Enums.Suits.isRed().(suit)*/ ==/*->scala::Any#`==`().*/ Hearts/*->_empty_::Enums.Suits.Hearts.*/ ||/*->scala::Boolean#`||`().*/ suit/*->_empty_::Enums.Suits.isRed().(suit)*/ ==/*->scala::Any#`==`().*/ Diamonds/*->_empty_::Enums.Suits.Diamonds.*/
1717

18-
def (suit: /*<-_empty_::Enums.Suits.isBlack().*//*<-_empty_::Enums.Suits.isBlack().(suit)*/Suits/*->_empty_::Enums.Suits#*/) isBlack: Boolean/*->scala::Boolean#*/ = suit/*->_empty_::Enums.Suits.isBlack().(suit)*/ match
18+
def (suit: /*<-_empty_::Enums.Suits.isBlack().*//*<-_empty_::Enums.Suits.isBlack().(suit)*/Suits/*->_empty_::Enums.Suits#*/).isBlack: Boolean/*->scala::Boolean#*/ = suit/*->_empty_::Enums.Suits.isBlack().(suit)*/ match
1919
case Spades/*->_empty_::Enums.Suits.Spades.*/ | Diamonds/*->_empty_::Enums.Suits.Diamonds.*/ => true
2020
case _ => false
2121

tests/semanticdb/expect/Givens.expect.scala

+10-10
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,24 @@ package b
33

44
object Givens/*<-a::b::Givens.*/
55

6-
given extension [A](any: /*<-a::b::Givens.given_sayHello_of_A.*//*<-a::b::Givens.given_sayHello_of_A.sayHello().[A]*//*<-a::b::Givens.given_sayHello_of_A.sayHello().(any)*/A/*->a::b::Givens.given_sayHello_of_A.sayHello().[A]*/)
7-
def sayHello/*<-a::b::Givens.given_sayHello_of_A.sayHello().*/ = s"/*->scala::StringContext.apply().*/Hello, I am $any/*->a::b::Givens.given_sayHello_of_A.sayHello().(any)*//*->scala::StringContext#s().*/"
6+
given extension [A](any: A/*<-a::b::Givens.extension_sayHello_A.*//*<-a::b::Givens.extension_sayHello_A.sayHello().[A]*//*<-a::b::Givens.extension_sayHello_A.sayHello().(any)*//*->a::b::Givens.extension_sayHello_A.sayHello().[A]*/)
7+
def sayHello/*<-a::b::Givens.extension_sayHello_A.sayHello().*/ = s"/*->scala::StringContext.apply().*/Hello, I am $any/*->a::b::Givens.extension_sayHello_A.sayHello().(any)*//*->scala::StringContext#s().*/"
88

9-
given extension [B](any: B)/*<-a::b::Givens.given_sayGoodbye_of_B.*//*<-a::b::Givens.given_sayGoodbye_of_B.sayGoodbye().[B]*//*<-a::b::Givens.given_sayGoodbye_of_B.saySoLong().[B]*//*<-a::b::Givens.given_sayGoodbye_of_B.sayGoodbye().(any)*//*<-a::b::Givens.given_sayGoodbye_of_B.saySoLong().(any)*//*->a::b::Givens.given_sayGoodbye_of_B.sayGoodbye().[B]*//*->a::b::Givens.given_sayGoodbye_of_B.saySoLong().[B]*/
10-
def sayGoodbye/*<-a::b::Givens.given_sayGoodbye_of_B.sayGoodbye().*/ = s"/*->scala::StringContext.apply().*/Goodbye, from $any/*->a::b::Givens.given_sayGoodbye_of_B.sayGoodbye().(any)*//*->scala::StringContext#s().*/"
11-
def saySoLong/*<-a::b::Givens.given_sayGoodbye_of_B.saySoLong().*/ = s"/*->scala::StringContext.apply().*/So Long, from $any/*->a::b::Givens.given_sayGoodbye_of_B.saySoLong().(any)*//*->scala::StringContext#s().*/"
9+
given extension [B](any: B)
10+
/*<-a::b::Givens.extension_sayGoodbye_B.*//*<-a::b::Givens.extension_sayGoodbye_B.sayGoodbye().[B]*//*<-a::b::Givens.extension_sayGoodbye_B.saySoLong().[B]*//*<-a::b::Givens.extension_sayGoodbye_B.sayGoodbye().(any)*//*<-a::b::Givens.extension_sayGoodbye_B.saySoLong().(any)*//*->a::b::Givens.extension_sayGoodbye_B.sayGoodbye().[B]*//*->a::b::Givens.extension_sayGoodbye_B.saySoLong().[B]*/ def sayGoodbye/*<-a::b::Givens.extension_sayGoodbye_B.sayGoodbye().*/ = s"/*->scala::StringContext.apply().*/Goodbye, from $any/*->a::b::Givens.extension_sayGoodbye_B.sayGoodbye().(any)*//*->scala::StringContext#s().*/"
11+
def saySoLong/*<-a::b::Givens.extension_sayGoodbye_B.saySoLong().*/ = s"/*->scala::StringContext.apply().*/So Long, from $any/*->a::b::Givens.extension_sayGoodbye_B.saySoLong().(any)*//*->scala::StringContext#s().*/"
1212

13-
val hello1/*<-a::b::Givens.hello1.*/ = /*->a::b::Givens.given_sayHello_of_A.sayHello().*/1.sayHello
14-
val goodbye1/*<-a::b::Givens.goodbye1.*/ = /*->a::b::Givens.given_sayGoodbye_of_B.sayGoodbye().*/1.sayGoodbye
15-
val soLong1/*<-a::b::Givens.soLong1.*/ = /*->a::b::Givens.given_sayGoodbye_of_B.saySoLong().*/1.saySoLong
13+
val hello1/*<-a::b::Givens.hello1.*/ = /*->a::b::Givens.extension_sayHello_A.sayHello().*/1.sayHello
14+
val goodbye1/*<-a::b::Givens.goodbye1.*/ = /*->a::b::Givens.extension_sayGoodbye_B.sayGoodbye().*/1.sayGoodbye
15+
val soLong1/*<-a::b::Givens.soLong1.*/ = /*->a::b::Givens.extension_sayGoodbye_B.saySoLong().*/1.saySoLong
1616

1717
trait Monoid/*<-a::b::Givens.Monoid#*/[A/*<-a::b::Givens.Monoid#[A]*/]
1818
def empty/*<-a::b::Givens.Monoid#empty().*/: A/*->a::b::Givens.Monoid#[A]*/
19-
def (x: A) /*<-a::b::Givens.Monoid#combine().*//*<-a::b::Givens.Monoid#combine().(x)*//*->a::b::Givens.Monoid#[A]*/combine (y/*<-a::b::Givens.Monoid#combine().(y)*/: A/*->a::b::Givens.Monoid#[A]*/): A/*->a::b::Givens.Monoid#[A]*/
19+
def (x: A)./*<-a::b::Givens.Monoid#combine().*//*<-a::b::Givens.Monoid#combine().(x)*//*->a::b::Givens.Monoid#[A]*/combine(y/*<-a::b::Givens.Monoid#combine().(y)*/: A/*->a::b::Givens.Monoid#[A]*/): A/*->a::b::Givens.Monoid#[A]*/
2020

2121
given Monoid[String]
2222
/*<-a::b::Givens.given_Monoid_String.*//*->a::b::Givens.Monoid#*//*->scala::Predef.String#*/def empty/*<-a::b::Givens.given_Monoid_String.empty().*/ = ""
23-
def (x: Str/*<-a::b::Givens.given_Monoid_String.combine().*//*<-a::b::Givens.given_Monoid_String.combine().(x)*/ing/*->scala::Predef.String#*/) combine (y/*<-a::b::Givens.given_Monoid_String.combine().(y)*/: String/*->scala::Predef.String#*/) = x/*->a::b::Givens.given_Monoid_String.combine().(x)*/ +/*->java::lang::String#`+`().*/ y/*->a::b::Givens.given_Monoid_String.combine().(y)*/
23+
def (x: Str/*<-a::b::Givens.given_Monoid_String.combine().*//*<-a::b::Givens.given_Monoid_String.combine().(x)*/ing/*->scala::Predef.String#*/).combine(y/*<-a::b::Givens.given_Monoid_String.combine().(y)*/: String/*->scala::Predef.String#*/) = x/*->a::b::Givens.given_Monoid_String.combine().(x)*/ +/*->java::lang::String#`+`().*/ y/*->a::b::Givens.given_Monoid_String.combine().(y)*/
2424

2525
inline given int2String/*<-a::b::Givens.int2String().*/: Conversion/*->scala::Conversion#*/[Int/*->scala::Int#*/, String/*->scala::Predef.String#*/] = _.toString/*->scala::Any#toString().*/
2626

tests/semanticdb/metac.expect

+41-40
Original file line numberDiff line numberDiff line change
@@ -1280,6 +1280,17 @@ a/b/Givens.Monoid#combine(). => abstract method combine
12801280
a/b/Givens.Monoid#combine().(x) => param x
12811281
a/b/Givens.Monoid#combine().(y) => param y
12821282
a/b/Givens.Monoid#empty(). => abstract method empty
1283+
a/b/Givens.extension_sayGoodbye_B. => final implicit object extension_sayGoodbye_B
1284+
a/b/Givens.extension_sayGoodbye_B.sayGoodbye(). => method sayGoodbye
1285+
a/b/Givens.extension_sayGoodbye_B.sayGoodbye().(any) => param any
1286+
a/b/Givens.extension_sayGoodbye_B.sayGoodbye().[B] => typeparam B
1287+
a/b/Givens.extension_sayGoodbye_B.saySoLong(). => method saySoLong
1288+
a/b/Givens.extension_sayGoodbye_B.saySoLong().(any) => param any
1289+
a/b/Givens.extension_sayGoodbye_B.saySoLong().[B] => typeparam B
1290+
a/b/Givens.extension_sayHello_A. => final implicit object extension_sayHello_A
1291+
a/b/Givens.extension_sayHello_A.sayHello(). => method sayHello
1292+
a/b/Givens.extension_sayHello_A.sayHello().(any) => param any
1293+
a/b/Givens.extension_sayHello_A.sayHello().[A] => typeparam A
12831294
a/b/Givens.foo(). => method foo
12841295
a/b/Givens.foo().(A) => implicit param A
12851296
a/b/Givens.foo().[A] => typeparam A
@@ -1288,17 +1299,6 @@ a/b/Givens.given_Monoid_String.combine(). => method combine
12881299
a/b/Givens.given_Monoid_String.combine().(x) => param x
12891300
a/b/Givens.given_Monoid_String.combine().(y) => param y
12901301
a/b/Givens.given_Monoid_String.empty(). => method empty
1291-
a/b/Givens.given_sayGoodbye_of_B. => final implicit object given_sayGoodbye_of_B
1292-
a/b/Givens.given_sayGoodbye_of_B.sayGoodbye(). => method sayGoodbye
1293-
a/b/Givens.given_sayGoodbye_of_B.sayGoodbye().(any) => param any
1294-
a/b/Givens.given_sayGoodbye_of_B.sayGoodbye().[B] => typeparam B
1295-
a/b/Givens.given_sayGoodbye_of_B.saySoLong(). => method saySoLong
1296-
a/b/Givens.given_sayGoodbye_of_B.saySoLong().(any) => param any
1297-
a/b/Givens.given_sayGoodbye_of_B.saySoLong().[B] => typeparam B
1298-
a/b/Givens.given_sayHello_of_A. => final implicit object given_sayHello_of_A
1299-
a/b/Givens.given_sayHello_of_A.sayHello(). => method sayHello
1300-
a/b/Givens.given_sayHello_of_A.sayHello().(any) => param any
1301-
a/b/Givens.given_sayHello_of_A.sayHello().[A] => typeparam A
13021302
a/b/Givens.goodbye1. => val method goodbye1
13031303
a/b/Givens.hello1. => val method hello1
13041304
a/b/Givens.int2String(). => final implicit macro int2String
@@ -1308,58 +1308,58 @@ Occurrences:
13081308
[0:8..0:9): a <- a/
13091309
[1:8..1:9): b <- a/b/
13101310
[3:7..3:13): Givens <- a/b/Givens.
1311-
[5:8..5:27): extension [A](any: <- a/b/Givens.given_sayHello_of_A.
1312-
[5:19..5:20): A <- a/b/Givens.given_sayHello_of_A.sayHello().[A]
1313-
[5:22..5:25): any <- a/b/Givens.given_sayHello_of_A.sayHello().(any)
1314-
[5:27..5:28): A -> a/b/Givens.given_sayHello_of_A.sayHello().[A]
1315-
[6:8..6:16): sayHello <- a/b/Givens.given_sayHello_of_A.sayHello().
1311+
[5:8..5:28): extension [A](any: A <- a/b/Givens.extension_sayHello_A.
1312+
[5:19..5:20): A <- a/b/Givens.extension_sayHello_A.sayHello().[A]
1313+
[5:22..5:25): any <- a/b/Givens.extension_sayHello_A.sayHello().(any)
1314+
[5:27..5:28): A -> a/b/Givens.extension_sayHello_A.sayHello().[A]
1315+
[6:8..6:16): sayHello <- a/b/Givens.extension_sayHello_A.sayHello().
13161316
[6:21..6:21): -> scala/StringContext.apply().
1317-
[6:34..6:37): any -> a/b/Givens.given_sayHello_of_A.sayHello().(any)
1317+
[6:34..6:37): any -> a/b/Givens.extension_sayHello_A.sayHello().(any)
13181318
[6:37..6:37): -> scala/StringContext#s().
1319-
[8:8..8:29): extension [B](any: B) <- a/b/Givens.given_sayGoodbye_of_B.
1320-
[8:19..8:20): B <- a/b/Givens.given_sayGoodbye_of_B.sayGoodbye().[B]
1321-
[8:19..8:20): B <- a/b/Givens.given_sayGoodbye_of_B.saySoLong().[B]
1322-
[8:22..8:25): any <- a/b/Givens.given_sayGoodbye_of_B.sayGoodbye().(any)
1323-
[8:22..8:25): any <- a/b/Givens.given_sayGoodbye_of_B.saySoLong().(any)
1324-
[8:27..8:28): B -> a/b/Givens.given_sayGoodbye_of_B.sayGoodbye().[B]
1325-
[8:27..8:28): B -> a/b/Givens.given_sayGoodbye_of_B.saySoLong().[B]
1326-
[9:8..9:18): sayGoodbye <- a/b/Givens.given_sayGoodbye_of_B.sayGoodbye().
1319+
[8:8..9:0): <- a/b/Givens.extension_sayGoodbye_B.
1320+
[8:19..8:20): B <- a/b/Givens.extension_sayGoodbye_B.sayGoodbye().[B]
1321+
[8:19..8:20): B <- a/b/Givens.extension_sayGoodbye_B.saySoLong().[B]
1322+
[8:22..8:25): any <- a/b/Givens.extension_sayGoodbye_B.sayGoodbye().(any)
1323+
[8:22..8:25): any <- a/b/Givens.extension_sayGoodbye_B.saySoLong().(any)
1324+
[8:27..8:28): B -> a/b/Givens.extension_sayGoodbye_B.sayGoodbye().[B]
1325+
[8:27..8:28): B -> a/b/Givens.extension_sayGoodbye_B.saySoLong().[B]
1326+
[9:8..9:18): sayGoodbye <- a/b/Givens.extension_sayGoodbye_B.sayGoodbye().
13271327
[9:23..9:23): -> scala/StringContext.apply().
1328-
[9:38..9:41): any -> a/b/Givens.given_sayGoodbye_of_B.sayGoodbye().(any)
1328+
[9:38..9:41): any -> a/b/Givens.extension_sayGoodbye_B.sayGoodbye().(any)
13291329
[9:41..9:41): -> scala/StringContext#s().
1330-
[10:8..10:17): saySoLong <- a/b/Givens.given_sayGoodbye_of_B.saySoLong().
1330+
[10:8..10:17): saySoLong <- a/b/Givens.extension_sayGoodbye_B.saySoLong().
13311331
[10:22..10:22): -> scala/StringContext.apply().
1332-
[10:37..10:40): any -> a/b/Givens.given_sayGoodbye_of_B.saySoLong().(any)
1332+
[10:37..10:40): any -> a/b/Givens.extension_sayGoodbye_B.saySoLong().(any)
13331333
[10:40..10:40): -> scala/StringContext#s().
13341334
[12:6..12:12): hello1 <- a/b/Givens.hello1.
1335-
[12:15..12:15): -> a/b/Givens.given_sayHello_of_A.sayHello().
1335+
[12:15..12:15): -> a/b/Givens.extension_sayHello_A.sayHello().
13361336
[13:6..13:14): goodbye1 <- a/b/Givens.goodbye1.
1337-
[13:17..13:17): -> a/b/Givens.given_sayGoodbye_of_B.sayGoodbye().
1337+
[13:17..13:17): -> a/b/Givens.extension_sayGoodbye_B.sayGoodbye().
13381338
[14:6..14:13): soLong1 <- a/b/Givens.soLong1.
1339-
[14:16..14:16): -> a/b/Givens.given_sayGoodbye_of_B.saySoLong().
1339+
[14:16..14:16): -> a/b/Givens.extension_sayGoodbye_B.saySoLong().
13401340
[16:8..16:14): Monoid <- a/b/Givens.Monoid#
13411341
[16:14..16:17): <- a/b/Givens.Monoid#`<init>`().
13421342
[16:15..16:16): A <- a/b/Givens.Monoid#[A]
13431343
[17:8..17:13): empty <- a/b/Givens.Monoid#empty().
13441344
[17:15..17:16): A -> a/b/Givens.Monoid#[A]
1345-
[18:8..18:15): (x: A) <- a/b/Givens.Monoid#combine().
1345+
[18:8..18:15): (x: A). <- a/b/Givens.Monoid#combine().
13461346
[18:9..18:10): x <- a/b/Givens.Monoid#combine().(x)
13471347
[18:12..18:13): A -> a/b/Givens.Monoid#[A]
1348-
[18:24..18:25): y <- a/b/Givens.Monoid#combine().(y)
1349-
[18:27..18:28): A -> a/b/Givens.Monoid#[A]
1350-
[18:31..18:32): A -> a/b/Givens.Monoid#[A]
1348+
[18:23..18:24): y <- a/b/Givens.Monoid#combine().(y)
1349+
[18:26..18:27): A -> a/b/Givens.Monoid#[A]
1350+
[18:30..18:31): A -> a/b/Givens.Monoid#[A]
13511351
[20:8..21:4): <- a/b/Givens.given_Monoid_String.
13521352
[20:8..20:14): Monoid -> a/b/Givens.Monoid#
13531353
[20:15..20:21): String -> scala/Predef.String#
13541354
[21:8..21:13): empty <- a/b/Givens.given_Monoid_String.empty().
13551355
[22:8..22:15): (x: Str <- a/b/Givens.given_Monoid_String.combine().
13561356
[22:9..22:10): x <- a/b/Givens.given_Monoid_String.combine().(x)
13571357
[22:12..22:18): String -> scala/Predef.String#
1358-
[22:29..22:30): y <- a/b/Givens.given_Monoid_String.combine().(y)
1359-
[22:32..22:38): String -> scala/Predef.String#
1360-
[22:42..22:43): x -> a/b/Givens.given_Monoid_String.combine().(x)
1361-
[22:44..22:45): + -> java/lang/String#`+`().
1362-
[22:46..22:47): y -> a/b/Givens.given_Monoid_String.combine().(y)
1358+
[22:28..22:29): y <- a/b/Givens.given_Monoid_String.combine().(y)
1359+
[22:31..22:37): String -> scala/Predef.String#
1360+
[22:41..22:42): x -> a/b/Givens.given_Monoid_String.combine().(x)
1361+
[22:43..22:44): + -> java/lang/String#`+`().
1362+
[22:45..22:46): y -> a/b/Givens.given_Monoid_String.combine().(y)
13631363
[24:15..24:25): int2String <- a/b/Givens.int2String().
13641364
[24:27..24:37): Conversion -> scala/Conversion#
13651365
[24:38..24:41): Int -> scala/Int#
@@ -3565,3 +3565,4 @@ Occurrences:
35653565
[2:46..2:47): z -> _empty_/toplevel$package.combine(+1).(z)
35663566
[3:4..3:11): combine <- _empty_/toplevel$package.combine(+2).
35673567
[4:4..4:7): foo <- _empty_/toplevel$package.foo().
3568+

0 commit comments

Comments
 (0)