Skip to content

Commit

Permalink
Add test, fix #15835
Browse files Browse the repository at this point in the history
  • Loading branch information
TheElectronWill committed Oct 23, 2022
1 parent 3bd7293 commit b4c5ef5
Show file tree
Hide file tree
Showing 3 changed files with 83 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/coverage/run/extend-case-class/test.check
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
1
6178
10 changes: 10 additions & 0 deletions tests/coverage/run/extend-case-class/test.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// see issue 15835
import java.math.MathContext
case class DecimalConf(mathContext: MathContext, scaleLimit: Int, digitsLimit: Int)
object DecimalConf extends DecimalConf(MathContext.UNLIMITED, 6178, 308)

@main
def Test: Unit =
val c = DecimalConf(MathContext.DECIMAL32, 1, 0)
println(c.scaleLimit)
println(DecimalConf.scaleLimit)
71 changes: 71 additions & 0 deletions tests/coverage/run/extend-case-class/test.scoverage.check
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# Coverage data, format version: 3.0
# Statement data:
# - id
# - source path
# - package name
# - class name
# - class type (Class, Object or Trait)
# - full class name
# - method name
# - start offset
# - end offset
# - line number
# - symbol name
# - tree name
# - is branch
# - invocations count
# - is ignored
# - description (can be multi-line)
# ' ' sign
# ------------------------------------------
0
extend-case-class/test.scala
<empty>
test$package$
Object
<empty>.test$package$
Test
282
303
8
println
Apply
false
0
false
println(c.scaleLimit)

1
extend-case-class/test.scala
<empty>
test$package$
Object
<empty>.test$package$
Test
306
337
9
println
Apply
false
0
false
println(DecimalConf.scaleLimit)

2
extend-case-class/test.scala
<empty>
test$package$
Object
<empty>.test$package$
Test
206
220
6
Test
DefDef
false
0
false
@main\ndef Test

0 comments on commit b4c5ef5

Please sign in to comment.