зеркало из https://github.com/mozilla/shumway.git
Merge pull request #89 from artcompiler/master
Various string fixes and updates to numbers.js and test pass list
This commit is contained in:
Коммит
f564b7ca36
|
@ -322,19 +322,15 @@ function runNextTest () {
|
|||
} else {
|
||||
someFailed = true;
|
||||
var nPassed = 0, nFailed = 0, nPassedPercentage = 1;
|
||||
if (result.output.text && baseline.output.text) {
|
||||
var match = result.output.text.match(/PASSED/g);
|
||||
nPassed = match ? match.length : 0;
|
||||
match = baseline.output.text.match(/PASSED/g);
|
||||
var nTotal = match ? match.length : 0;
|
||||
nPassedPercentage = (nPassed / nTotal) * 100 | 0;
|
||||
}
|
||||
if (nPassedPercentage >= 50) {
|
||||
process.stdout.write(WARN + " PASS " + padLeft(nPassedPercentage.toString(), ' ', 3) + " %" + ENDC);
|
||||
} else {
|
||||
process.stdout.write(FAIL + " FAIL " + padLeft(nPassedPercentage.toString(), ' ', 3) + " %" + ENDC);
|
||||
failedTests.push(test);
|
||||
}
|
||||
var match = result.output.text.match(/PASSED/g);
|
||||
nPassed = match ? match.length : 0;
|
||||
match = baseline.output.text.match(/PASSED/g);
|
||||
var nTotal = match ? match.length : 0;
|
||||
nPassedPercentage = (nPassed / nTotal) * 100 | 0;
|
||||
process.stdout.write(FAIL + " FAIL " + padLeft(nPassedPercentage.toString(), ' ', 3) + " %" + ENDC);
|
||||
process.stdout.write("\nEXPECTED\n|"+baseline.output.text+"|")
|
||||
process.stdout.write("\nACTUAL\n|"+result.output.text+"|")
|
||||
failedTests.push(test);
|
||||
count(configuration.name + ":fail");
|
||||
}
|
||||
process.stdout.write(" " + (result.elapsed / 1000).toFixed(2));
|
||||
|
|
|
@ -629,7 +629,6 @@
|
|||
../tests/tamarin/ecma3/Number/e15_7_4_1.abc
|
||||
../tests/tamarin/ecma3/Number/e15_7_4_3_1_rt.abc
|
||||
../tests/tamarin/ecma3/Number/e15_7_4_3_2.abc
|
||||
../tests/tamarin/ecma3/Number/e15_7_4__1_rt.abc
|
||||
../tests/tamarin/ecma3/Number/tostring_001.abc
|
||||
../tests/tamarin/ecma3/ObjectObjects/bug129539.abc
|
||||
../tests/tamarin/ecma3/ObjectObjects/e15_2_3_1_1.abc
|
||||
|
@ -917,7 +916,6 @@
|
|||
../tests/tamarin/spidermonkey/js1_5/Regress/regress-162392.abc
|
||||
../tests/tamarin/spidermonkey/js1_5/Regress/regress-165201.abc
|
||||
../tests/tamarin/spidermonkey/js1_5/Regress/regress-167658.abc
|
||||
../tests/tamarin/spidermonkey/js1_5/Regress/regress-170193.abc
|
||||
../tests/tamarin/spidermonkey/js1_5/Regress/regress-185165.abc
|
||||
../tests/tamarin/spidermonkey/js1_5/Regress/regress-193418.abc
|
||||
../tests/tamarin/spidermonkey/js1_5/Regress/regress-203402.abc
|
||||
|
@ -1136,7 +1134,6 @@
|
|||
../tests/tamarin/regress/bug_615544.abc
|
||||
../tests/tamarin/spidermonkey/js1_5/GC/regress-203278-3.abc
|
||||
../tests/tamarin/spidermonkey/js1_2/String/slice.abc
|
||||
../tests/tamarin/mmgc/memlimit.abc
|
||||
../tests/tamarin/ecma3/Statements/throw.abc
|
||||
../tests/tamarin/ecma3/Statements/etry_003.abc
|
||||
../tests/tamarin/ecma3/Number/e15_7_3_6_2.abc
|
||||
|
@ -1155,7 +1152,6 @@
|
|||
../tests/tamarin/ecma3/Exceptions/exception_014_rt.abc
|
||||
../tests/tamarin/ecma3/Date/e15_9_5_12_7.abc
|
||||
../tests/tamarin/ecma3/Date/e15_9_5_12_6.abc
|
||||
../tests/tamarin/ecma3/Expressions/e11_7_2.abc
|
||||
../tests/tamarin/ecma3/Date/e15_9_5_12_5.abc
|
||||
../tests/tamarin/ecma3/Date/e15_9_5_10_7.abc
|
||||
../tests/tamarin/ecma3/Date/e15_9_5_10_13.abc
|
||||
|
@ -1169,57 +1165,11 @@
|
|||
../tests/tamarin/as3/Definitions/Variable/ConstVariables.abc
|
||||
../tests/tamarin/as3/Definitions/FunctionAccessors/AccessorSpray.abc
|
||||
../tests/tamarin/as3/Vector/initializerLargeVector.abc
|
||||
../tests/tamarin/abcasm/bug_554915b.abc
|
||||
../tests/tamarin/abcasm/bug_554915a.abc
|
||||
../tests/tamarin/ecma3/RegExp/eproperties_002.abc
|
||||
../tests/tamarin/ecma3/Date/e15_9_5_36_3.abc
|
||||
../tests/tamarin/ecma3/Date/e15_9_5_36_2.abc
|
||||
../tests/tamarin/ecma3/Date/e15_9_5_37_3.abc
|
||||
../tests/tamarin/ecma3/Date/e15_9_5_37_2.abc
|
||||
../tests/tamarin/ecma3/Date/e15_9_5_36_1.abc
|
||||
../tests/tamarin/ecma3/Date/e15_9_5_37_4.abc
|
||||
../tests/tamarin/ecma3/Date/e15_9_5_33_1.abc
|
||||
../tests/tamarin/ecma3/Date/e15_9_5_36_7.abc
|
||||
../tests/tamarin/ecma3/Date/e15_9_5_36_4.abc
|
||||
../tests/tamarin/ecma3/Date/e15_9_5_37_5.abc
|
||||
../tests/tamarin/ecma3/Date/e15_9_5_24_7.abc
|
||||
../tests/tamarin/ecma3/Date/e15_9_5_24_5.abc
|
||||
../tests/tamarin/ecma3/Date/e15_9_5_24_8.abc
|
||||
../tests/tamarin/ecma3/Date/e15_9_5_24_6.abc
|
||||
../tests/tamarin/ecma3/Date/e15_9_5_24_4.abc
|
||||
../tests/tamarin/ecma3/Date/e15_9_5_24_2.abc
|
||||
../tests/tamarin/ecma3/Date/e15_9_5_24_1.abc
|
||||
../tests/tamarin/ecma3/Date/e15_9_5_24_3.abc
|
||||
../tests/tamarin/ecma3/Date/e15_9_5_23_17.abc
|
||||
../tests/tamarin/ecma3/Date/e15_9_5_31_1.abc
|
||||
../tests/tamarin/ecma3/Date/e15_9_5_23_15.abc
|
||||
../tests/tamarin/ecma3/Date/e15_9_5_23_18.abc
|
||||
../tests/tamarin/ecma3/Date/e15_9_5_36_6.abc
|
||||
../tests/tamarin/ecma3/Date/e15_9_5_23_11.abc
|
||||
../tests/tamarin/ecma3/Date/e15_9_5_23_16.abc
|
||||
../tests/tamarin/ecma3/Date/e15_9_5_23_14.abc
|
||||
../tests/tamarin/ecma3/Date/e15_9_5_23_1.abc
|
||||
../tests/tamarin/ecma3/Date/e15_9_5_30_1.abc
|
||||
../tests/tamarin/ecma3/Date/e15_9_5_23_12.abc
|
||||
../tests/tamarin/ecma3/Date/e15_9_5_23_13.abc
|
||||
../tests/tamarin/ecma3/Date/e15_9_5_23_10.abc
|
||||
../tests/tamarin/ecma3/Date/e15_9_5_36_5.abc
|
||||
../tests/tamarin/ecma3/Date/e15_9_5_37_1.abc
|
||||
../tests/tamarin/ecma3/Date/e15_9_5_32_1.abc
|
||||
../tests/tamarin/ecma3/Date/e15_9_5_34_1.abc
|
||||
../tests/tamarin/ecma3/Array/e15_4_4_9.abc
|
||||
../tests/tamarin/ecma3/Array/e15_4_4_7.abc
|
||||
../tests/tamarin/ecma3/Array/e15_4_4_6.abc
|
||||
../tests/tamarin/ecma3/Array/e15_4_4_10.abc
|
||||
../tests/tamarin/as3/Definitions/Classes/Ext/PubExtDefaultClass.abc
|
||||
../tests/tamarin/as3/Definitions/Classes/Ext/FinExtDynamicClass.abc
|
||||
../tests/tamarin/spidermonkey/js1_5/Scope/scope-003.abc
|
||||
../tests/tamarin/spidermonkey/js1_5/Regress/regress-417893.abc
|
||||
../tests/tamarin/spidermonkey/js1_5/Regress/regress-360969-03.abc
|
||||
../tests/tamarin/spidermonkey/js1_5/Regress/regress-360969-01.abc
|
||||
../tests/tamarin/spidermonkey/js1_5/Regress/regress-360969-04.abc
|
||||
../tests/tamarin/spidermonkey/js1_5/Regress/regress-398085-01.abc
|
||||
../tests/tamarin/spidermonkey/js1_5/Regress/regress-360969-02.abc
|
||||
../tests/tamarin/spidermonkey/js1_5/Regress/regress-281930.abc
|
||||
../tests/tamarin/spidermonkey/js1_5/Regress/regress-451946.abc
|
||||
../tests/tamarin/spidermonkey/js1_5/Function/function-15-3-4-4.abc
|
||||
|
@ -1227,7 +1177,6 @@
|
|||
../tests/tamarin/spidermonkey/js1_3/inherit/proto_12.abc
|
||||
../tests/tamarin/spidermonkey/js1_2/Objects/toString-001.abc
|
||||
../tests/tamarin/regress/bug_557933.abc
|
||||
../tests/tamarin/spidermonkey/js1_5/GC/regress-278725.abc
|
||||
../tests/tamarin/ecma3/Statements/e12_10_1.abc
|
||||
../tests/tamarin/ecma3/RegExp/efunction_001.abc
|
||||
../tests/tamarin/ecma3/RegExp/econstructor_001.abc
|
||||
|
@ -1249,14 +1198,9 @@
|
|||
../tests/tamarin/ecma3/Date/e15_9_5_26_1.abc
|
||||
../tests/tamarin/ecma3/Date/e15_9_5_25_1.abc
|
||||
../tests/tamarin/ecma3/Date/e15_9_5_28_1.abc
|
||||
../tests/tamarin/ecma3/Expressions/e11_10_2.abc
|
||||
../tests/tamarin/ecma3/Expressions/e11_10_3.abc
|
||||
../tests/tamarin/ecma3/Date/e15_9_5_12_4.abc
|
||||
../tests/tamarin/ecma3/Expressions/e11_7_1.abc
|
||||
../tests/tamarin/ecma3/Array/e15_4_5_1_2.abc
|
||||
../tests/tamarin/ecma3/Array/e15_4_4.abc
|
||||
../tests/tamarin/ecma3/Expressions/e11_7_3.abc
|
||||
../tests/tamarin/ecma3/Array/e15_4_2_3.abc
|
||||
../tests/tamarin/ecma3/Array/e15_4_2_1_1.abc
|
||||
../tests/tamarin/ecma3/Array/e15_4_1_3.abc
|
||||
../tests/tamarin/ecma3/Array/e15_4_1_1.abc
|
||||
|
@ -1272,7 +1216,6 @@
|
|||
../tests/tamarin/as3/Types/Number/floor.abc
|
||||
../tests/tamarin/as3/Types/Number/ceil.abc
|
||||
../tests/tamarin/as3/Types/Number/atan.abc
|
||||
../tests/tamarin/as3/Types/Number/asin.abc
|
||||
../tests/tamarin/as3/Types/Number/acos.abc
|
||||
../tests/tamarin/as3/Types/Number/abs.abc
|
||||
../tests/tamarin/as3/Types/Number/atan2.abc
|
||||
|
@ -1306,13 +1249,6 @@
|
|||
../tests/tamarin/as3/Statements/Exceptions/MultipleCatchBlocksType.abc
|
||||
../tests/tamarin/as3/Statements/Exceptions/MultipleCatchBlocksRefErrorCaughtWithError.abc
|
||||
../tests/tamarin/as3/Statements/Exceptions/MultipleCatchBlocksEval.abc
|
||||
../tests/tamarin/as3/Definitions/Packages/NoPackageName.abc
|
||||
../tests/tamarin/as3/Definitions/Packages/NestedImports.abc
|
||||
../tests/tamarin/as3/Definitions/Packages/FullyQualifiedNames2.abc
|
||||
../tests/tamarin/as3/Definitions/Packages/FullyQualifiedNames.abc
|
||||
../tests/tamarin/as3/Definitions/FunctionAccessors/GetSetStaticExtended.abc
|
||||
../tests/tamarin/as3/Definitions/FunctionAccessors/GetSetStatic.abc
|
||||
../tests/tamarin/as3/Definitions/FunctionAccessors/GetSetInternal.abc
|
||||
../tests/tamarin/as3/Definitions/FunctionAccessors/GetSetAllowedNames.abc
|
||||
../tests/tamarin/as3/Definitions/Function/RestGlobal.abc
|
||||
../tests/tamarin/as3/Definitions/Classes/Override/OverrideWithOptionalParams.abc
|
||||
|
@ -1321,7 +1257,6 @@
|
|||
../tests/tamarin/as3/Definitions/Classes/ClassDef/PublicStaticFinalDynamicClassMethodAndProp.abc
|
||||
../tests/tamarin/as3/Definitions/Classes/ClassDef/PublicDynamicClass.abc
|
||||
../tests/tamarin/as3/Definitions/Classes/ClassDef/PublicClassMethodAndProp.abc
|
||||
../tests/tamarin/as3/Definitions/Classes/ClassDef/publicClassDefCons.abc
|
||||
../tests/tamarin/as3/Definitions/Classes/ClassDef/PublicClass.abc
|
||||
../tests/tamarin/as3/Definitions/Classes/ClassDef/PrivateStaticClassMethodAndProp.abc
|
||||
../tests/tamarin/as3/Definitions/Classes/ClassDef/InternalDynamicClass.abc
|
||||
|
@ -1333,5 +1268,54 @@
|
|||
../tests/tamarin/as3/Definitions/Classes/ClassDef/FinalInternalClass.abc
|
||||
../tests/tamarin/as3/Definitions/Classes/ClassDef/FinalDefaultDynamicClass.abc
|
||||
../tests/tamarin/as3/Definitions/Classes/ClassDef/FinalDefaultClass.abc
|
||||
../tests/tamarin/as3/Definitions/Classes/ClassDef/DynamicClassProp.abc
|
||||
../tests/tamarin/as3/Definitions/Classes/ClassDef/DefaultDynamicClass.abc
|
||||
../tests/tamarin/as3/Definitions/Classes/ClassDef/DefaultDynamicClass.abc
|
||||
../tests/tamarin/ecma3/Statements/e12_6_3_3.abc
|
||||
../tests/tamarin/ecma3/Statements/e12_6_3_4.abc
|
||||
../tests/tamarin/ecma3/Statements/e12_6_3_19.abc
|
||||
../tests/tamarin/ecma3/Statements/e12_6_3_10.abc
|
||||
../tests/tamarin/ecma3/RegExp/eregress_72964.abc
|
||||
../tests/tamarin/ecma3/ObjectObjects/e8_6_2_6_001.abc
|
||||
../tests/tamarin/ecma3/ObjectObjects/e15_2_3_1_2.abc
|
||||
../tests/tamarin/ecma3/ObjectObjects/class_006.abc
|
||||
../tests/tamarin/ecma3/ObjectObjects/class_005.abc
|
||||
../tests/tamarin/ecma3/LexicalConventions/eregexp_literals_001.abc
|
||||
../tests/tamarin/ecma3/LexicalConventions/eregexp_literals_002.abc
|
||||
../tests/tamarin/ecma3/instanceof/instanceof_001.abc
|
||||
../tests/tamarin/ecma3/FunctionObjects/e15_3_3_1_3.abc
|
||||
../tests/tamarin/ecma3/Function/e15_3_4_3_1.abc
|
||||
../tests/tamarin/ecma3/Function/e15_3_4_4_1_rt.abc
|
||||
../tests/tamarin/ecma3/Expressions/instanceof_006.abc
|
||||
../tests/tamarin/ecma3/Exceptions/e15_11_4_4_1.abc
|
||||
../tests/tamarin/ecma3/Boolean/e15_6_3_1_2.abc
|
||||
../tests/tamarin/ecma3/Array/sparseArray.abc
|
||||
../tests/tamarin/ecma3/Array/e15_4_5_2_1.abc
|
||||
../tests/tamarin/ecma3/Array/e15_4_4_4_2.abc
|
||||
../tests/tamarin/ecma3/Array/e15_4_4_4_001.abc
|
||||
../tests/tamarin/as3/Vector/Vector_object_methods.abc
|
||||
../tests/tamarin/as3/Vector/Vector_uint_methods.abc
|
||||
../tests/tamarin/as3/Vector/Vector_double_methods.abc
|
||||
../tests/tamarin/as3/Vector/tostring.abc
|
||||
../tests/tamarin/as3/Vector/reverseInitializers.abc
|
||||
../tests/tamarin/as3/Vector/reverse.abc
|
||||
../tests/tamarin/as3/Types/Conversions/ImplicitConversionsTrue.abc
|
||||
../tests/tamarin/as3/Types/Conversions/ImplicitConversionsNeg1_23.abc
|
||||
../tests/tamarin/as3/Types/Conversions/ImplicitConversionsFalse.abc
|
||||
../tests/tamarin/as3/Types/Conversions/ImplicitConversions1_23.abc
|
||||
../tests/tamarin/as3/Expressions/asOperator/asOperatorTypes.abc
|
||||
../tests/tamarin/as3/Expressions/asOperator/asOperatorMuliti.abc
|
||||
../tests/tamarin/as3/Expressions/asOperator/asOperator.abc
|
||||
../tests/tamarin/as3/Definitions/Super/SuperArgsCall.abc
|
||||
../tests/tamarin/as3/Definitions/FunctionAccessors/GetSuper.abc
|
||||
../tests/tamarin/as3/Definitions/Classes/Override/SuperSameNamespace.abc
|
||||
../tests/tamarin/as3/Definitions/Classes/Override/SuperSameMethod.abc
|
||||
../tests/tamarin/as3/Definitions/Classes/Override/PubExtPublicOverRidePublic.abc
|
||||
../tests/tamarin/as3/Definitions/Classes/Override/PubExtPublicOverRideDefault.abc
|
||||
../tests/tamarin/as3/Definitions/Classes/Override/OverrideNoParamType.abc
|
||||
../tests/tamarin/as3/Definitions/Classes/Override/FinExtPublicOverRidePublic.abc
|
||||
../tests/tamarin/as3/Definitions/Classes/Override/FinExtPublicOverRideDefault.abc
|
||||
../tests/tamarin/as3/Definitions/Classes/ExtImpl/PubExtDefaultImplDefPub.abc
|
||||
../tests/tamarin/as3/Definitions/Classes/ExtImpl/ExtDefaultImplDefPub.abc
|
||||
../tests/tamarin/as3/Definitions/Classes/ExtImpl/DynExtDefaultImplDefPub.abc
|
||||
../tests/tamarin/as3/Definitions/Classes/Ext/ExtDynamicClassPub.abc
|
||||
../tests/tamarin/as3/Definitions/Classes/Ext/ExtDynamicClass.abc
|
||||
../tests/tamarin/as3/Definitions/Classes/Ext/ExtDefaultClassPub.abc
|
||||
|
|
|
@ -229,6 +229,19 @@ function coerceString(x) {
|
|||
}
|
||||
|
||||
function typeOf(x) {
|
||||
// ABC doesn't box primitives, so typeof returns the primitive type even when
|
||||
// the value is new'd
|
||||
if (x) {
|
||||
if (x.constructor==String) {
|
||||
return "string"
|
||||
}
|
||||
else if (x.constructor==Number) {
|
||||
return "number"
|
||||
}
|
||||
else if (x.constructor==Boolean) {
|
||||
return "boolean"
|
||||
}
|
||||
}
|
||||
return typeof x;
|
||||
}
|
||||
|
||||
|
@ -703,7 +716,8 @@ function deleteProperty(obj, mn) {
|
|||
}
|
||||
|
||||
// Only dynamic properties can be deleted, so only look for those.
|
||||
if (resolved instanceof Multiname && !resolved.namespaces[0].isPublic()) {
|
||||
if (resolved instanceof Multiname && !resolved.namespaces[0].isPublic() ||
|
||||
typeof obj !== "object" || obj === null) { // if primitive, then return false
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -722,6 +736,7 @@ function deleteProperty(obj, mn) {
|
|||
}
|
||||
return delete obj[Multiname.getQualifiedName(resolved)];
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function isInstanceOf(value, type) {
|
||||
|
|
|
@ -25,6 +25,9 @@ function error(message) {
|
|||
}
|
||||
|
||||
function assert(condition) {
|
||||
if (condition === "") { // avoid inadvertent false positive
|
||||
condition = true;
|
||||
}
|
||||
if (!condition) {
|
||||
var message = Array.prototype.slice.call(arguments);
|
||||
message.shift();
|
||||
|
|
Загрузка…
Ссылка в новой задаче