I created a CL for this: http://codereview.chromium.org/10388208/

The weird thing is that this test does not fail prior to the original
CL (Correctly
check for native error objects.)

Yang


On Fri, May 18, 2012 at 7:56 PM, Erik Arvidsson <[email protected]> wrote:

> On Fri, May 18, 2012 at 10:28 AM, Yang Guo <[email protected]> wrote:
> > We do have a testing framework with the cctests with which we can test
> > things from the C++ side. Maybe we can mimick the bindings code there.
>
> This does not need binding code to be tested. Here is a pseudo test.
>
> function MyError(name, message) {
>  this.name = name;
>  this.message = message;
> }
> MyError.prototype = Object.create(Error.prototype);
> MyError.prototype.toString = function() {
>  return 'MyError toString';
> };
>
> throw new MyError('name', 'message');
>
> then assert that the v8::Message has something like "Uncaught MyError
> toString" and not "Uncaught name: message".
>
> Does that make sense?
>
> > Yang
> >
> > On May 18, 2012 7:07 PM, <[email protected]> wrote:
> >>
> >> LGTM
> >>
> >>
> >> Thanks.
> >>
> >> It would have been good have some tests for this. I'm not sure how you
> >> test what
> >> is in the v8::Message object though?
> >>
> >> https://chromiumcodereview.appspot.com/10392158/
>
>
>
> --
> erik
>

-- 
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to