Commit Graph

5 Commits

Author SHA1 Message Date
ager@chromium.org
a01b45df58 Fix a number of tests that incorrectly used assertUnreachable.
Our testing infrastructure uses exceptions to indicate
errors. assertUnreachable therefore throws an exception to indicate
that it was reached. Therefore, it cannot be used to check that an
exception was thrown using the pattern:

try {
  shouldThrow();
  assertUnreachable();
} catch(e) {
}

Such a test will always pass because assertUnreachable will throw an
exception if shouldThrow does not.

R=ricow@chromium.org

Review URL: http://codereview.chromium.org/7053035

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8117 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-31 08:08:42 +00:00
lrn@chromium.org
7aec228dbb Cleanup of mjsunit.js code and make assertEquals more strict.
Encapsulate the helper functions in mjsunit.js.
Now only exposes the exception class and the assertXXX functions.

Make assertEquals use === instead of ==.
This prevents a lot of possiblefalse positives in tests, and avoids
having to do assertTrue(expected === actual) when you need it.

Fixed some tests that were either buggy or assuming == test.

Review URL: http://codereview.chromium.org/6869007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7628 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-15 11:35:36 +00:00
ricow@chromium.org
fb6d7e17df Follow jsc on not throwing when trying to add a property to a non-extensible object.
This change makes us compatible with Safari on not throwing when trying to add a property to a non-extensible object. 
Review URL: http://codereview.chromium.org/6712059

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7379 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-28 06:11:08 +00:00
sgjesse@chromium.org
a1a3aa46a2 Object.seal(obj) and Object.freeze(obj) should return the input obj.
BUG=http://code.google.com/p/v8/issues/detail?id=809
TEST=Seal/freeze an object and check if Object.seal and Object.freeze returns the given object.

Burcu Dogan <burcujdogan@gmail.com>

Review URL: http://codereview.chromium.org/3056049


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5176 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-05 10:56:15 +00:00
ricow@chromium.org
f5f0b80363 Implement ES5 Object.seal and Object.isSealed.
This change adds the ES5 Object.seal 15.2.3.8 and Object.isSealed 15.2.3.11 methods.

Review URL: http://codereview.chromium.org/2993006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5072 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-15 07:51:14 +00:00