mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
codegen: Test WebIDL sequence arguments
This commit is contained in:
parent
92d7c49924
commit
1509d87545
2 changed files with 14 additions and 0 deletions
|
@ -188,6 +188,7 @@ impl TestBindingMethods for TestBinding {
|
|||
fn ReceiveObject(&self, _: *mut JSContext) -> *mut JSObject { panic!() }
|
||||
fn ReceiveUnion(&self) -> HTMLElementOrLong { HTMLElementOrLong::eLong(0) }
|
||||
fn ReceiveUnion2(&self) -> EventOrString { EventOrString::eString(DOMString::new()) }
|
||||
fn ReceiveSequence(&self) -> Vec<i32> { vec![1] }
|
||||
|
||||
fn ReceiveNullableBoolean(&self) -> Option<bool> { Some(false) }
|
||||
fn ReceiveNullableByte(&self) -> Option<i8> { Some(0) }
|
||||
|
@ -216,6 +217,7 @@ impl TestBindingMethods for TestBinding {
|
|||
fn ReceiveNullableUnion2(&self) -> Option<EventOrString> {
|
||||
Some(EventOrString::eString(DOMString::new()))
|
||||
}
|
||||
fn ReceiveNullableSequence(&self) -> Option<Vec<i32>> { Some(vec![1]) }
|
||||
|
||||
fn PassBoolean(&self, _: bool) {}
|
||||
fn PassByte(&self, _: i8) {}
|
||||
|
@ -242,6 +244,8 @@ impl TestBindingMethods for TestBinding {
|
|||
fn PassObject(&self, _: *mut JSContext, _: *mut JSObject) {}
|
||||
fn PassCallbackFunction(&self, _: Rc<Function>) {}
|
||||
fn PassCallbackInterface(&self, _: Rc<EventListener>) {}
|
||||
fn PassSequence(&self, _: Vec<i32>) {}
|
||||
fn PassStringSequence(&self, _: Vec<DOMString>) {}
|
||||
|
||||
fn PassNullableBoolean(&self, _: Option<bool>) {}
|
||||
fn PassNullableByte(&self, _: Option<i8>) {}
|
||||
|
@ -266,6 +270,7 @@ impl TestBindingMethods for TestBinding {
|
|||
fn PassNullableUnion2(&self, _: Option<EventOrString>) {}
|
||||
fn PassNullableCallbackFunction(&self, _: Option<Rc<Function>>) {}
|
||||
fn PassNullableCallbackInterface(&self, _: Option<Rc<EventListener>>) {}
|
||||
fn PassNullableSequence(&self, _: Option<Vec<i32>>) {}
|
||||
|
||||
fn PassOptionalBoolean(&self, _: Option<bool>) {}
|
||||
fn PassOptionalByte(&self, _: Option<i8>) {}
|
||||
|
@ -291,6 +296,7 @@ impl TestBindingMethods for TestBinding {
|
|||
fn PassOptionalObject(&self, _: *mut JSContext, _: Option<*mut JSObject>) {}
|
||||
fn PassOptionalCallbackFunction(&self, _: Option<Rc<Function>>) {}
|
||||
fn PassOptionalCallbackInterface(&self, _: Option<Rc<EventListener>>) {}
|
||||
fn PassOptionalSequence(&self, _: Option<Vec<i32>>) {}
|
||||
|
||||
fn PassOptionalNullableBoolean(&self, _: Option<Option<bool>>) {}
|
||||
fn PassOptionalNullableByte(&self, _: Option<Option<i8>>) {}
|
||||
|
@ -315,6 +321,7 @@ impl TestBindingMethods for TestBinding {
|
|||
fn PassOptionalNullableUnion2(&self, _: Option<Option<EventOrString>>) {}
|
||||
fn PassOptionalNullableCallbackFunction(&self, _: Option<Option<Rc<Function>>>) {}
|
||||
fn PassOptionalNullableCallbackInterface(&self, _: Option<Option<Rc<EventListener>>>) {}
|
||||
fn PassOptionalNullableSequence(&self, _: Option<Option<Vec<i32>>>) {}
|
||||
|
||||
fn PassOptionalBooleanWithDefault(&self, _: bool) {}
|
||||
fn PassOptionalByteWithDefault(&self, _: i8) {}
|
||||
|
|
|
@ -149,6 +149,7 @@ interface TestBinding {
|
|||
object receiveObject();
|
||||
(HTMLElement or long) receiveUnion();
|
||||
(Event or DOMString) receiveUnion2();
|
||||
sequence<long> receiveSequence();
|
||||
|
||||
byte? receiveNullableByte();
|
||||
boolean? receiveNullableBoolean();
|
||||
|
@ -171,6 +172,7 @@ interface TestBinding {
|
|||
object? receiveNullableObject();
|
||||
(HTMLElement or long)? receiveNullableUnion();
|
||||
(Event or DOMString)? receiveNullableUnion2();
|
||||
sequence<long>? receiveNullableSequence();
|
||||
|
||||
void passBoolean(boolean arg);
|
||||
void passByte(byte arg);
|
||||
|
@ -197,6 +199,8 @@ interface TestBinding {
|
|||
void passObject(object arg);
|
||||
void passCallbackFunction(Function fun);
|
||||
void passCallbackInterface(EventListener listener);
|
||||
void passSequence(sequence<long> seq);
|
||||
void passStringSequence(sequence<DOMString> seq);
|
||||
|
||||
void passNullableBoolean(boolean? arg);
|
||||
void passNullableByte(byte? arg);
|
||||
|
@ -221,6 +225,7 @@ interface TestBinding {
|
|||
void passNullableUnion2((Event or DOMString)? data);
|
||||
void passNullableCallbackFunction(Function? fun);
|
||||
void passNullableCallbackInterface(EventListener? listener);
|
||||
void passNullableSequence(sequence<long>? seq);
|
||||
|
||||
void passOptionalBoolean(optional boolean arg);
|
||||
void passOptionalByte(optional byte arg);
|
||||
|
@ -246,6 +251,7 @@ interface TestBinding {
|
|||
void passOptionalObject(optional object arg);
|
||||
void passOptionalCallbackFunction(optional Function fun);
|
||||
void passOptionalCallbackInterface(optional EventListener listener);
|
||||
void passOptionalSequence(optional sequence<long> seq);
|
||||
|
||||
void passOptionalNullableBoolean(optional boolean? arg);
|
||||
void passOptionalNullableByte(optional byte? arg);
|
||||
|
@ -270,6 +276,7 @@ interface TestBinding {
|
|||
void passOptionalNullableUnion2(optional (Event or DOMString)? data);
|
||||
void passOptionalNullableCallbackFunction(optional Function? fun);
|
||||
void passOptionalNullableCallbackInterface(optional EventListener? listener);
|
||||
void passOptionalNullableSequence(optional sequence<long>? seq);
|
||||
|
||||
void passOptionalBooleanWithDefault(optional boolean arg = false);
|
||||
void passOptionalByteWithDefault(optional byte arg = 0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue