41 lines
1.1 KiB
YAML
41 lines
1.1 KiB
YAML
type: edu
|
|
files:
|
|
- name: src/Task.kt
|
|
visible: true
|
|
placeholders:
|
|
- offset: 103
|
|
length: 489
|
|
placeholder_text: // TODO class Level
|
|
- offset: 607
|
|
length: 678
|
|
placeholder_text: |-
|
|
/*
|
|
val level = Level(1..10)
|
|
trace(capture { level.set(0) })
|
|
trace(capture { level.set(11) })
|
|
trace(capture { Level(1..10, -1) })
|
|
trace(capture { Level(1..10, 42) })
|
|
fun testUp() =
|
|
trace("${level.value}, ${level.up()}")
|
|
fun testDown() =
|
|
trace("${level.value}, ${level.down()}")
|
|
testUp()
|
|
testDown()
|
|
level.set(10)
|
|
testUp()
|
|
level.set(1)
|
|
testDown()
|
|
trace eq """
|
|
IllegalArgumentException: set() argument out of range: 0
|
|
IllegalArgumentException: set() argument out of range: 11
|
|
IllegalArgumentException: Initial level out of range: -1
|
|
IllegalArgumentException: Initial level out of range: 42
|
|
1, 2
|
|
2, 1
|
|
10, 10
|
|
1, 1
|
|
"""
|
|
*/
|
|
- name: test/Tests.kt
|
|
visible: false
|