mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
strings: builder: write_b()
This commit is contained in:

committed by
Alexander Medvednikov

parent
55f32fc413
commit
5a8c07dcf5
@ -38,3 +38,14 @@ fn test_big_sb() {
|
||||
|
||||
}
|
||||
|
||||
fn test_byte_write() {
|
||||
mut sb := strings.new_builder(100)
|
||||
temp_str := "byte testing"
|
||||
mut count := 0
|
||||
for word in temp_str {
|
||||
sb.write_b(word)
|
||||
count += 1
|
||||
assert count == sb.len
|
||||
}
|
||||
assert sb.str() == temp_str
|
||||
}
|
||||
|
Reference in New Issue
Block a user