harness.ok(True, "TestArrayBuffer interface parsed without error")
harness.check(len(iface.members), 22, "Interface should have twenty two members")
members = iface.members
def checkStuff(attr, method, t):
harness.ok(isinstance(attr, WebIDL.IDLAttribute), "Expect an IDLAttribute")
harness.ok(isinstance(method, WebIDL.IDLMethod), "Expect an IDLMethod")
harness.check(str(attr.type), t, "Expect an ArrayBuffer type")
harness.ok(attr.type.isSpiderMonkeyInterface(), "Should test as a js interface")
(retType, arguments) = method.signatures()[0]
harness.ok(retType.isUndefined(), "Should have an undefined return type")
harness.check(len(arguments), 3, "Expect 3 arguments")
harness.check(str(arguments[0].type), t, "Expect an ArrayBuffer type")
harness.ok(
arguments[0].type.isSpiderMonkeyInterface(), "Should test as a js interface"
)
harness.check(
str(arguments[1].type), t + "OrNull", "Expect an ArrayBuffer type"
)
harness.ok(
arguments[1].type.inner.isSpiderMonkeyInterface(), "Should test as a js interface",
)
harness.check(
str(arguments[2].type), t + "Sequence", "Expect an ArrayBuffer type"
)
harness.ok(
arguments[2].type.inner.isSpiderMonkeyInterface(), "Should test as a js interface",
)
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.