Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(281)

Unified Diff: test/mjsunit/es6/collections.js

Issue 546803003: Update ObjectToString to Harmony-draft algorithm (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebase, rename ObjectToString Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/cctest/test-api.cc ('k') | test/mjsunit/es6/generators-objects.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/es6/collections.js
diff --git a/test/mjsunit/es6/collections.js b/test/mjsunit/es6/collections.js
index 94b2aea12b49ef598bd5dbc1d10a79068fab5dcc..60ce46b2e569e8a206a0923b0d46fe778570d9c4 100644
--- a/test/mjsunit/es6/collections.js
+++ b/test/mjsunit/es6/collections.js
@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --expose-gc --allow-natives-syntax
+// Flags: --expose-gc --allow-natives-syntax --harmony-tostring
function assertSize(expected, collection) {
@@ -300,7 +300,7 @@ assertEquals("WeakSet", WeakSet.name);
function TestPrototype(C) {
assertTrue(C.prototype instanceof Object);
assertEquals({
- value: {},
+ value: C.prototype,
writable: false,
enumerable: false,
configurable: false
@@ -1423,3 +1423,12 @@ function TestMapConstructorIterableValue(ctor) {
}
TestMapConstructorIterableValue(Map);
TestMapConstructorIterableValue(WeakMap);
+
+function TestCollectionToString(C) {
+ assertEquals("[object " + C.name + "]",
+ Object.prototype.toString.call(new C()));
+}
+TestCollectionToString(Map);
+TestCollectionToString(Set);
+TestCollectionToString(WeakMap);
+TestCollectionToString(WeakSet);
« no previous file with comments | « test/cctest/test-api.cc ('k') | test/mjsunit/es6/generators-objects.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698