Revision: 23090
Author: [email protected]
Date: Tue Aug 12 19:54:52 2014 UTC
Log: WeakMap/WeakSet: Add test for non object keys
Add test for non object keys in the iterable passed to the constructor.
BUG=v8:3399
LOG=Y
[email protected]
Review URL: https://codereview.chromium.org/451033003
http://code.google.com/p/v8/source/detail?r=23090
Modified:
/branches/bleeding_edge/test/mjsunit/es6/collections.js
=======================================
--- /branches/bleeding_edge/test/mjsunit/es6/collections.js Fri Aug 8
13:39:13 2014 UTC
+++ /branches/bleeding_edge/test/mjsunit/es6/collections.js Tue Aug 12
19:54:52 2014 UTC
@@ -1141,6 +1141,13 @@
TestSetConstructorNextNotAnObject(WeakSet);
+(function TestWeakSetConstructorNonObjectKeys() {
+ assertThrows(function() {
+ new WeakSet([1]);
+ }, TypeError);
+})();
+
+
function TestMapConstructor(ctor) {
var m = new ctor(null);
assertSize(0, m);
@@ -1286,3 +1293,10 @@
}
TestMapConstructorIteratorNotObjectValues(Map);
TestMapConstructorIteratorNotObjectValues(WeakMap);
+
+
+(function TestWeakMapConstructorNonObjectKeys() {
+ assertThrows(function() {
+ new WeakMap([[1, 2]])
+ }, TypeError);
+})();
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.