Files
wren/test/api/call.wren
T

37 lines
640 B
Plaintext
Raw Normal View History

2015-12-15 16:02:13 -08:00
class Call {
static noParams {
System.print("noParams")
}
static zero() {
System.print("zero")
}
static one(one) {
2015-11-11 07:55:48 -08:00
System.print("one %(one)")
}
static two(one, two) {
// Don't print null bytes.
if (two is String && two.bytes.contains(0)) {
two = two.bytes.toList
}
2015-11-11 07:55:48 -08:00
System.print("two %(one) %(two)")
}
2015-12-29 07:58:47 -08:00
static getValue() { ["a", "b"] }
}
// expect: noParams
// expect: zero
// expect: one 1
// expect: two 1 2
// expect: two true false
// expect: two 1.2 3.4
// expect: two string another
// expect: two null [a, b]
// expect: two str [98, 0, 121, 0, 116, 0, 101]
// expect: one 0.1