1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

all: TypeSymbol.source_name (#6187)

This commit is contained in:
Daniel Däschle
2020-08-22 12:29:15 +02:00
committed by GitHub
parent b5ca114a96
commit fcc61a981d
15 changed files with 266 additions and 135 deletions

View File

@ -54,8 +54,9 @@ fn ws_test(uri string) ? {
ws.on_message(fn (mut ws websocket.Client, msg &websocket.Message) ? {
println('client got type: $msg.opcode payload:\n$msg.payload')
if msg.opcode == .text_frame {
println('Message: ${string(msg.payload, msg.payload.len)}')
assert string(msg.payload, msg.payload.len) == 'a'
smessage := msg.payload.bytestr()
println('Message: $smessage')
assert smessage == 'a'
} else {
println('Binary message: $msg')
}