Reviewers: Jakob,
Description:
Change mjsunit tests to work with and without the i18n extension
BUG=v8:2745
[email protected]
Please review this at https://codereview.chromium.org/18187006/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files:
M test/mjsunit/date.js
M test/mjsunit/debug-script.js
M test/mjsunit/function-call.js
Index: test/mjsunit/date.js
diff --git a/test/mjsunit/date.js b/test/mjsunit/date.js
index
5aaa3bb94e2dc76fea950223fb6f118ebd86eeb4..a1b7871d60bf06531dcf91438f1c766ff8df81c2
100644
--- a/test/mjsunit/date.js
+++ b/test/mjsunit/date.js
@@ -150,7 +150,7 @@ assertTrue(isNaN(l.getUTCMilliseconds()));
// date without the timezone information.
function testToLocaleTimeString() {
var d = new Date();
- var s = d.toLocaleTimeString();
+ var s = d.toLocaleTimeString("en-GB");
assertEquals(8, s.length);
}
@@ -340,4 +340,4 @@ date.getYear();
%OptimizeFunctionOnNextCall(Date.prototype.getYear);
assertThrows(function() { Date.prototype.getYear.call(""); }, TypeError);
opt_status = %GetOptimizationStatus(Date.prototype.getYear);
-assertTrue(%GetOptimizationStatus(Date.prototype.getTime) != 1);
\ No newline at end of file
+assertTrue(%GetOptimizationStatus(Date.prototype.getTime) != 1);
Index: test/mjsunit/debug-script.js
diff --git a/test/mjsunit/debug-script.js b/test/mjsunit/debug-script.js
index
afaa36904285e0b80563fa435843d1b3fa438a96..c456e6bf574fa5533b0ac1a0112f0472e7032aaa
100644
--- a/test/mjsunit/debug-script.js
+++ b/test/mjsunit/debug-script.js
@@ -61,9 +61,8 @@ for (i = 0; i < scripts.length; i++) {
// This has to be updated if the number of native scripts change.
assertEquals(16, named_native_count);
-// If no snapshot is used, only the 'gc' extension is loaded.
-// If snapshot is used, all extensions are cached in the snapshot.
-assertTrue(extension_count == 1 || extension_count == 5);
+// Only the 'gc' and (depending on flags) the 'i18n' extensions are loaded.
+assertTrue(extension_count == 1 || extension_count == 2);
// This script and mjsunit.js has been loaded. If using d8, d8 loads
// a normal script during startup too.
assertTrue(normal_count == 2 || normal_count == 3);
Index: test/mjsunit/function-call.js
diff --git a/test/mjsunit/function-call.js b/test/mjsunit/function-call.js
index
92792ac8273d8a82f15eecd48952efc08af5a052..38be10c48b5d46b9fa17587b9341dbfeaf43a07b
100644
--- a/test/mjsunit/function-call.js
+++ b/test/mjsunit/function-call.js
@@ -151,6 +151,7 @@ var reducing_functions =
function checkExpectedMessage(e) {
assertTrue(e.message.indexOf("called on null or undefined") >= 0 ||
+ e.message.indexOf("invoked on undefined or null value") >= 0 |
|
e.message.indexOf("Cannot convert null to object") >= 0);
}
--
--
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/groups/opt_out.