Revision: 22995
Author:   [email protected]
Date:     Fri Aug  8 11:57:51 2014 UTC
Log:      Fix debug-promises tests.

Using assertEquals on two Promises always passes. Use assertSame instead.

[email protected]

Review URL: https://codereview.chromium.org/455683002
http://code.google.com/p/v8/source/detail?r=22995

Modified:
/branches/bleeding_edge/test/mjsunit/es6/debug-promises/reject-caught-all.js /branches/bleeding_edge/test/mjsunit/es6/debug-promises/reject-uncaught-all.js /branches/bleeding_edge/test/mjsunit/es6/debug-promises/reject-uncaught-late.js /branches/bleeding_edge/test/mjsunit/es6/debug-promises/reject-uncaught-uncaught.js /branches/bleeding_edge/test/mjsunit/es6/debug-promises/reject-with-invalid-reject.js /branches/bleeding_edge/test/mjsunit/es6/debug-promises/reject-with-undefined-reject.js
 /branches/bleeding_edge/test/mjsunit/es6/debug-promises/throw-caught-all.js
/branches/bleeding_edge/test/mjsunit/es6/debug-promises/throw-uncaught-all.js /branches/bleeding_edge/test/mjsunit/es6/debug-promises/throw-uncaught-uncaught.js /branches/bleeding_edge/test/mjsunit/es6/debug-promises/throw-with-throw-in-reject.js /branches/bleeding_edge/test/mjsunit/es6/debug-promises/throw-with-undefined-reject.js

=======================================
--- /branches/bleeding_edge/test/mjsunit/es6/debug-promises/reject-caught-all.js Wed Aug 6 09:41:52 2014 UTC +++ /branches/bleeding_edge/test/mjsunit/es6/debug-promises/reject-caught-all.js Fri Aug 8 11:57:51 2014 UTC
@@ -36,7 +36,7 @@
       expected_events--;
       assertTrue(expected_events >= 0);
       assertEquals("reject", event_data.exception().message);
-      assertEquals(q, event_data.promise());
+      assertSame(q, event_data.promise());
       assertFalse(event_data.uncaught());
     }
   } catch (e) {
=======================================
--- /branches/bleeding_edge/test/mjsunit/es6/debug-promises/reject-uncaught-all.js Wed Aug 6 09:41:52 2014 UTC +++ /branches/bleeding_edge/test/mjsunit/es6/debug-promises/reject-uncaught-all.js Fri Aug 8 11:57:51 2014 UTC
@@ -31,7 +31,7 @@
       assertTrue(expected_events >= 0);
       assertEquals("uncaught reject", event_data.exception().message);
       assertTrue(event_data.promise() instanceof Promise);
-      assertEquals(q, event_data.promise());
+      assertSame(q, event_data.promise());
       assertTrue(event_data.uncaught());
       // All of the frames on the stack are from native Javascript.
       assertEquals(0, exec_state.frameCount());
=======================================
--- /branches/bleeding_edge/test/mjsunit/es6/debug-promises/reject-uncaught-late.js Wed Aug 6 09:41:52 2014 UTC +++ /branches/bleeding_edge/test/mjsunit/es6/debug-promises/reject-uncaught-late.js Fri Aug 8 11:57:51 2014 UTC
@@ -38,7 +38,7 @@
       assertTrue(expected_events >= 0);
       assertEquals("uncaught reject p", event_data.exception().message);
       assertTrue(event_data.promise() instanceof Promise);
-      assertEquals(p, event_data.promise());
+      assertSame(p, event_data.promise());
       assertTrue(event_data.uncaught());
       // Assert that the debug event is triggered at the throw site.
assertTrue(exec_state.frame(0).sourceLineText().indexOf("// event")
0);
=======================================
--- /branches/bleeding_edge/test/mjsunit/es6/debug-promises/reject-uncaught-uncaught.js Wed Aug 6 09:41:52 2014 UTC +++ /branches/bleeding_edge/test/mjsunit/es6/debug-promises/reject-uncaught-uncaught.js Fri Aug 8 11:57:51 2014 UTC
@@ -31,7 +31,7 @@
       assertTrue(expected_events >= 0);
       assertEquals("uncaught reject", event_data.exception().message);
       assertTrue(event_data.promise() instanceof Promise);
-      assertEquals(q, event_data.promise());
+      assertSame(q, event_data.promise());
       assertTrue(event_data.uncaught());
       // All of the frames on the stack are from native Javascript.
       assertEquals(0, exec_state.frameCount());
=======================================
--- /branches/bleeding_edge/test/mjsunit/es6/debug-promises/reject-with-invalid-reject.js Wed Aug 6 09:41:52 2014 UTC +++ /branches/bleeding_edge/test/mjsunit/es6/debug-promises/reject-with-invalid-reject.js Fri Aug 8 11:57:51 2014 UTC
@@ -42,7 +42,6 @@
assertEquals("number is not a function", event_data.exception().message);
       // All of the frames on the stack are from native Javascript.
       assertEquals(0, exec_state.frameCount());
-      assertEquals(q, event_data.promise());
     }
   } catch (e) {
     %AbortJS(e + "\n" + e.stack);
=======================================
--- /branches/bleeding_edge/test/mjsunit/es6/debug-promises/reject-with-undefined-reject.js Wed Aug 6 09:41:52 2014 UTC +++ /branches/bleeding_edge/test/mjsunit/es6/debug-promises/reject-with-undefined-reject.js Fri Aug 8 11:57:51 2014 UTC
@@ -42,7 +42,6 @@
       assertEquals("caught", event_data.exception().message);
       // All of the frames on the stack are from native Javascript.
       assertEquals(0, exec_state.frameCount());
-      assertEquals(q, event_data.promise());
     }
   } catch (e) {
     %AbortJS(e + "\n" + e.stack);
=======================================
--- /branches/bleeding_edge/test/mjsunit/es6/debug-promises/throw-caught-all.js Wed Aug 6 09:41:52 2014 UTC +++ /branches/bleeding_edge/test/mjsunit/es6/debug-promises/throw-caught-all.js Fri Aug 8 11:57:51 2014 UTC
@@ -35,7 +35,7 @@
       expected_events--;
       assertTrue(expected_events >= 0);
       assertEquals("caught", event_data.exception().message);
-      assertEquals(q, event_data.promise());
+      assertSame(q, event_data.promise());
       assertFalse(event_data.uncaught());
     }
   } catch (e) {
=======================================
--- /branches/bleeding_edge/test/mjsunit/es6/debug-promises/throw-uncaught-all.js Wed Aug 6 09:41:52 2014 UTC +++ /branches/bleeding_edge/test/mjsunit/es6/debug-promises/throw-uncaught-all.js Fri Aug 8 11:57:51 2014 UTC
@@ -32,7 +32,7 @@
       assertTrue(expected_events >= 0);
       assertEquals("uncaught", event_data.exception().message);
       assertTrue(event_data.promise() instanceof Promise);
-      assertEquals(q, event_data.promise());
+      assertSame(q, event_data.promise());
       assertTrue(event_data.uncaught());
       // Assert that the debug event is triggered at the throw site.
assertTrue(exec_state.frame(0).sourceLineText().indexOf("// event")
0);
=======================================
--- /branches/bleeding_edge/test/mjsunit/es6/debug-promises/throw-uncaught-uncaught.js Wed Aug 6 09:41:52 2014 UTC +++ /branches/bleeding_edge/test/mjsunit/es6/debug-promises/throw-uncaught-uncaught.js Fri Aug 8 11:57:51 2014 UTC
@@ -32,7 +32,7 @@
       assertTrue(expected_events >= 0);
       assertEquals("uncaught", event_data.exception().message);
       assertTrue(event_data.promise() instanceof Promise);
-      assertEquals(q, event_data.promise());
+      assertSame(q, event_data.promise());
       assertTrue(event_data.uncaught());
       // Assert that the debug event is triggered at the throw site.
assertTrue(exec_state.frame(0).sourceLineText().indexOf("// event")
0);
=======================================
--- /branches/bleeding_edge/test/mjsunit/es6/debug-promises/throw-with-throw-in-reject.js Wed Aug 6 09:41:52 2014 UTC +++ /branches/bleeding_edge/test/mjsunit/es6/debug-promises/throw-with-throw-in-reject.js Fri Aug 8 11:57:51 2014 UTC
@@ -53,7 +53,7 @@
       } else {
         assertUnreachable();
       }
-      assertEquals(q, event_data.promise());
+      assertSame(q, event_data.promise());
assertTrue(exec_state.frame(0).sourceLineText().indexOf('// event')
0);
     }
   } catch (e) {
=======================================
--- /branches/bleeding_edge/test/mjsunit/es6/debug-promises/throw-with-undefined-reject.js Wed Aug 6 09:41:52 2014 UTC +++ /branches/bleeding_edge/test/mjsunit/es6/debug-promises/throw-with-undefined-reject.js Fri Aug 8 11:57:51 2014 UTC
@@ -53,7 +53,7 @@
       } else {
         assertUnreachable();
       }
-      assertEquals(q, event_data.promise());
+      assertSame(q, event_data.promise());
     }
   } catch (e) {
     %AbortJS(e + "\n" + e.stack);

--
--
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.

Reply via email to