add devtools-protocol
This commit is contained in:
@@ -115,6 +115,7 @@ impl PrometeuRunner {
|
||||
|
||||
// Enviar Handshake
|
||||
let handshake = DebugResponse::Handshake {
|
||||
protocol_version: DEVTOOLS_PROTOCOL_VERSION,
|
||||
runtime_version: "0.1".to_string(),
|
||||
cartridge: HandshakeCartridge {
|
||||
app_id: self.firmware.os.current_app_id,
|
||||
@@ -693,6 +694,7 @@ mod tests {
|
||||
let n = stream.read(&mut buf).expect("Deve ler handshake");
|
||||
let resp: serde_json::Value = serde_json::from_slice(&buf[..n]).expect("Handshake deve ser JSON válido");
|
||||
assert_eq!(resp["type"], "handshake");
|
||||
assert_eq!(resp["protocol_version"], DEVTOOLS_PROTOCOL_VERSION);
|
||||
|
||||
// Envia start via JSON
|
||||
stream.write_all(b"{\"type\":\"start\"}\n").expect("Conexão deve estar aberta para escrita");
|
||||
|
||||
Reference in New Issue
Block a user