mirror of
https://github.com/openai/codex.git
synced 2026-11-24 23:20:47 +00:00
v8: include CRDTP bindings in 147 Bazel builds
Add the `crdtp_binding.cc` source and CRDTP headers to the 147 Bazel V8 binding target so Windows GNU builds provide the symbols required by the `v8::crdtp` Rust APIs. Add a regression test that exercises CRDTP JSON conversion and dispatchable message parsing.
This commit is contained in:
@@ -78,4 +78,15 @@ mod tests {
|
||||
fn evaluates_string_concatenation() {
|
||||
assert_eq!(evaluate_expression("'hello ' + 'world'"), "hello world");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parses_crdtp_dispatchable_messages() {
|
||||
let cbor = v8::crdtp::json_to_cbor(br#"{"id":7,"method":"Runtime.evaluate","params":{}}"#)
|
||||
.expect("JSON should convert to CBOR");
|
||||
let dispatchable = v8::crdtp::Dispatchable::new(&cbor);
|
||||
|
||||
assert!(dispatchable.ok());
|
||||
assert_eq!(dispatchable.call_id(), 7);
|
||||
assert_eq!(dispatchable.method(), b"Runtime.evaluate");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user