auto merge of #2547 : Ms2ger/servo/dictionary-tests, r=jdm

This commit is contained in:
bors-servo 2014-06-02 13:07:47 -04:00
commit 488ac518e4
2 changed files with 13 additions and 13 deletions

View file

@ -686,7 +686,7 @@ def getJSToNativeConversionTemplate(type, descriptorProvider, failureCode=None,
"yet") "yet")
enum = type.inner.identifier.name enum = type.inner.identifier.name
if invalidEnumValueFatal: if invalidEnumValueFatal:
handleInvalidEnumValueCode = "return 0;" handleInvalidEnumValueCode = exceptionCode
else: else:
handleInvalidEnumValueCode = "return 1;" handleInvalidEnumValueCode = "return 1;"
@ -696,7 +696,7 @@ def getJSToNativeConversionTemplate(type, descriptorProvider, failureCode=None,
" Ok(None) => { %(handleInvalidEnumValueCode)s },\n" " Ok(None) => { %(handleInvalidEnumValueCode)s },\n"
" Ok(Some(index)) => {\n" " Ok(Some(index)) => {\n"
" //XXXjdm need some range checks up in here.\n" " //XXXjdm need some range checks up in here.\n"
" cast::transmute(index)\n" " unsafe { cast::transmute(index) }\n"
" },\n" " },\n"
"}" % { "values" : enum + "Values::strings", "}" % { "values" : enum + "Values::strings",
"exceptionCode" : exceptionCode, "exceptionCode" : exceptionCode,

View file

@ -23,30 +23,30 @@ enum TestEnum { "", "foo", "bar" };
}; */ }; */
dictionary TestDictionaryDefaults { dictionary TestDictionaryDefaults {
// boolean booleanValue = false; boolean booleanValue = false;
// byte byteValue = 7; byte byteValue = 7;
// octet octetValue = 7; octet octetValue = 7;
short shortValue = 7; short shortValue = 7;
unsigned short unsignedShortValue = 7; unsigned short unsignedShortValue = 7;
long longValue = 7; long longValue = 7;
unsigned long unsignedLongValue = 7; unsigned long unsignedLongValue = 7;
// long long longLongValue = 7; long long longLongValue = 7;
// unsigned long long unsignedLongLongValue = 7; unsigned long long unsignedLongLongValue = 7;
// float floatValue = 7.0; // float floatValue = 7.0;
// double doubleValue = 7.0; // double doubleValue = 7.0;
DOMString stringValue = ""; DOMString stringValue = "";
// TestEnum enumValue = "bar"; TestEnum enumValue = "bar";
any anyValue = null; any anyValue = null;
// boolean? nullableBooleanValue = false; boolean? nullableBooleanValue = false;
// byte? nullableByteValue = 7; byte? nullableByteValue = 7;
// octet? nullableOctetValue = 7; octet? nullableOctetValue = 7;
short? nullableShortValue = 7; short? nullableShortValue = 7;
unsigned short? nullableUnsignedShortValue = 7; unsigned short? nullableUnsignedShortValue = 7;
long? nullableLongValue = 7; long? nullableLongValue = 7;
unsigned long? nullableUnsignedLongValue = 7; unsigned long? nullableUnsignedLongValue = 7;
// long long? nullableLongLongValue = 7; long long? nullableLongLongValue = 7;
// unsigned long long? nullableUnsignedLongLongValue = 7; unsigned long long? nullableUnsignedLongLongValue = 7;
// float? nullableFloatValue = 7.0; // float? nullableFloatValue = 7.0;
// double? nullableDoubleValue = 7.0; // double? nullableDoubleValue = 7.0;
DOMString? nullableStringValue = ""; DOMString? nullableStringValue = "";