summaryrefslogtreecommitdiff
path: root/test/built-ins
diff options
context:
space:
mode:
authorAndré Bargull <andre.bargull@gmail.com>2017-02-07 17:10:56 +0100
committerLeo Balter <leonardo.balter@gmail.com>2017-02-07 11:10:56 -0500
commit204266794c93dc917008c9db68e34cb9f94db1d2 (patch)
tree789859851e8435789b14c7a915b6e409cb9bd33a /test/built-ins
parent4203261ba244b2503c482f0fe95a2f29a476e112 (diff)
downloadqtdeclarative-testsuites-204266794c93dc917008c9db68e34cb9f94db1d2.tar.gz
Fix various test issues (#840)
test/annexB/built-ins/Date/prototype/setYear/time-clip.js test/built-ins/Date/prototype/setFullYear/new-value-time-clip.js test/built-ins/Date/prototype/setMonth/new-value-time-clip.js - Don't try to test time-clip at the end points, because this is near impossible to get right (needs to consider time zone offset, dst, local mean time because of Africa/Monrovia, etc.). test/built-ins/DataView/prototype/setFloat64/detached-buffer-after-toindex-byteoffset.js test/built-ins/DataView/prototype/setInt16/detached-buffer-after-toindex-byteoffset.js - Wasn't update to expect RangeError test/built-ins/Function/internals/Construct/derived-this-uninitialized-realm.js - Change ClassDeclaration -> ClassExpression to get completion value test/built-ins/Function/prototype/toString/AsyncFunction.js - Add missing \n in expected string - Also fixed in gh-847 test/built-ins/global/global-object.js - Add 'var' to make test pass in strict-mode test/language/block-scope/syntax/redeclaration-in-block/attempt-to-redeclare-function-declaration-with-function-declaration.js - This is allowed in sloppy mode when Annex B is implemented test/language/expressions/async-generators/expression-yield-as-statement.js - Fix calls to then() test/language/module-code/namespace/internals/own-property-keys-binding-types.js test/language/module-code/namespace/internals/own-property-keys-sort.js - Tests weren't updated after removal of @@iterator from module namespace objects test/language/module-code/namespace/internals/set-prototype-of-null.js - Fix syntax error test/language/statements/async-function/early-errors-no-async-generator.js - No longer valid now that async iteration proposal is at stage 3
Diffstat (limited to 'test/built-ins')
-rw-r--r--test/built-ins/DataView/prototype/setFloat64/detached-buffer-after-toindex-byteoffset.js2
-rw-r--r--test/built-ins/DataView/prototype/setInt16/detached-buffer-after-toindex-byteoffset.js2
-rw-r--r--test/built-ins/Date/prototype/setFullYear/new-value-time-clip.js2
-rw-r--r--test/built-ins/Date/prototype/setMonth/new-value-time-clip.js2
-rw-r--r--test/built-ins/Function/internals/Construct/derived-this-uninitialized-realm.js4
-rw-r--r--test/built-ins/global/global-object.js2
6 files changed, 7 insertions, 7 deletions
diff --git a/test/built-ins/DataView/prototype/setFloat64/detached-buffer-after-toindex-byteoffset.js b/test/built-ins/DataView/prototype/setFloat64/detached-buffer-after-toindex-byteoffset.js
index 367c749de..341c520b5 100644
--- a/test/built-ins/DataView/prototype/setFloat64/detached-buffer-after-toindex-byteoffset.js
+++ b/test/built-ins/DataView/prototype/setFloat64/detached-buffer-after-toindex-byteoffset.js
@@ -28,7 +28,7 @@ var sample = new DataView(buffer, 0);
$DETACHBUFFER(buffer);
-assert.throws(TypeError, function() {
+assert.throws(RangeError, function() {
sample.setFloat64(Infinity, 0);
}, "Infinity");
diff --git a/test/built-ins/DataView/prototype/setInt16/detached-buffer-after-toindex-byteoffset.js b/test/built-ins/DataView/prototype/setInt16/detached-buffer-after-toindex-byteoffset.js
index f193bde4f..d619af6c1 100644
--- a/test/built-ins/DataView/prototype/setInt16/detached-buffer-after-toindex-byteoffset.js
+++ b/test/built-ins/DataView/prototype/setInt16/detached-buffer-after-toindex-byteoffset.js
@@ -28,7 +28,7 @@ var sample = new DataView(buffer, 0);
$DETACHBUFFER(buffer);
-assert.throws(TypeError, function() {
+assert.throws(RangeError, function() {
sample.setInt16(Infinity, 0);
}, "Infinity");
diff --git a/test/built-ins/Date/prototype/setFullYear/new-value-time-clip.js b/test/built-ins/Date/prototype/setFullYear/new-value-time-clip.js
index 83aa448f9..b3d73dd27 100644
--- a/test/built-ins/Date/prototype/setFullYear/new-value-time-clip.js
+++ b/test/built-ins/Date/prototype/setFullYear/new-value-time-clip.js
@@ -44,6 +44,6 @@ assert.sameValue(returnValue, NaN, 'overflow due to month');
date = new Date(maxMs);
-returnValue = date.setFullYear(maxYear, maxMonth, maxDate + 1);
+returnValue = date.setFullYear(maxYear, maxMonth, maxDate + 2);
assert.sameValue(returnValue, NaN, 'overflow due to date');
diff --git a/test/built-ins/Date/prototype/setMonth/new-value-time-clip.js b/test/built-ins/Date/prototype/setMonth/new-value-time-clip.js
index 71e850544..3ea6b8f90 100644
--- a/test/built-ins/Date/prototype/setMonth/new-value-time-clip.js
+++ b/test/built-ins/Date/prototype/setMonth/new-value-time-clip.js
@@ -37,6 +37,6 @@ assert.sameValue(returnValue, NaN, 'overflow due to month');
date = new Date(maxMs);
-returnValue = date.setMonth(maxMonth, maxDate + 1);
+returnValue = date.setMonth(maxMonth, maxDate + 2);
assert.sameValue(returnValue, NaN, 'overflow due to date');
diff --git a/test/built-ins/Function/internals/Construct/derived-this-uninitialized-realm.js b/test/built-ins/Function/internals/Construct/derived-this-uninitialized-realm.js
index ad1a918e4..c051a457d 100644
--- a/test/built-ins/Function/internals/Construct/derived-this-uninitialized-realm.js
+++ b/test/built-ins/Function/internals/Construct/derived-this-uninitialized-realm.js
@@ -19,9 +19,9 @@ features: [class]
---*/
var C = $.createRealm().global.eval(
- 'class C extends Object {' +
+ '(class C extends Object {' +
' constructor() {}' +
- '}'
+ '});'
);
assert.throws(ReferenceError, function() {
diff --git a/test/built-ins/global/global-object.js b/test/built-ins/global/global-object.js
index 21be0f769..d3efe5415 100644
--- a/test/built-ins/global/global-object.js
+++ b/test/built-ins/global/global-object.js
@@ -22,5 +22,5 @@ assert.sameValue(Number, global.Number);
assert.sameValue(RegExp, global.RegExp);
assert.sameValue(String, global.String);
-globalVariable = {};
+var globalVariable = {};
assert.sameValue(globalVariable, global.globalVariable);