v/vlib/strings/strings_test.v

8 lines
160 B
V
Raw Normal View History

import strings
fn test_repeat() {
2019-12-22 00:05:30 +01:00
assert strings.repeat(`x`, 10) == 'xxxxxxxxxx'
assert strings.repeat(`a`, 1) == 'a'
assert strings.repeat(`a`, 0) == ''
}