Commit aa3518a0 authored by yangguo@chromium.org's avatar yangguo@chromium.org

Make sure files end with exactly one new line and police this in presubmit.

The changes are (excluding presubmit.py) mechanical. I added the following
lines after the check and iterated the presubmit script until all errors
went away:

f = open(name, "w");
if contents.endswith('\n\n'):
  f.write(contents[0:-1])
else:
  f.write(contents + '\n')

R=jkummerow@chromium.org

Review URL: https://codereview.chromium.org/82803005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18017 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent bf473a4a
...@@ -22,4 +22,3 @@ ...@@ -22,4 +22,3 @@
} }
] ]
} }
...@@ -135,4 +135,3 @@ class AllocationTracker { ...@@ -135,4 +135,3 @@ class AllocationTracker {
} } // namespace v8::internal } } // namespace v8::internal
#endif // V8_ALLOCATION_TRACKER_H_ #endif // V8_ALLOCATION_TRACKER_H_
...@@ -107,5 +107,3 @@ function SetUpArrayBuffer() { ...@@ -107,5 +107,3 @@ function SetUpArrayBuffer() {
} }
SetUpArrayBuffer(); SetUpArrayBuffer();
...@@ -132,4 +132,3 @@ namespace v8 { namespace internal { ...@@ -132,4 +132,3 @@ namespace v8 { namespace internal {
intptr_t HeapObjectTagMask() { return kHeapObjectTagMask; } intptr_t HeapObjectTagMask() { return kHeapObjectTagMask; }
} } // namespace v8::internal } } // namespace v8::internal
...@@ -85,4 +85,3 @@ int V8HeapExplorer::GetGcSubrootOrder(HeapObject* subroot) { ...@@ -85,4 +85,3 @@ int V8HeapExplorer::GetGcSubrootOrder(HeapObject* subroot) {
} } // namespace v8::internal } } // namespace v8::internal
#endif // V8_HEAP_SNAPSHOT_GENERATOR_INL_H_ #endif // V8_HEAP_SNAPSHOT_GENERATOR_INL_H_
...@@ -704,4 +704,3 @@ class HeapSnapshotJSONSerializer { ...@@ -704,4 +704,3 @@ class HeapSnapshotJSONSerializer {
} } // namespace v8::internal } } // namespace v8::internal
#endif // V8_HEAP_SNAPSHOT_GENERATOR_H_ #endif // V8_HEAP_SNAPSHOT_GENERATOR_H_
...@@ -27,4 +27,3 @@ ...@@ -27,4 +27,3 @@
// Since there is no simulator for the ia32 architecture this file is empty. // Since there is no simulator for the ia32 architecture this file is empty.
...@@ -24,4 +24,3 @@ ...@@ -24,4 +24,3 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
...@@ -74,4 +74,3 @@ TEST(MultipleRecords) { ...@@ -74,4 +74,3 @@ TEST(MultipleRecords) {
} }
CHECK(cq.IsEmpty()); CHECK(cq.IsEmpty());
} }
...@@ -546,4 +546,3 @@ TEST(UniqueSet_UnionExhaustive) { ...@@ -546,4 +546,3 @@ TEST(UniqueSet_UnionExhaustive) {
} }
} }
} }
...@@ -43,4 +43,3 @@ assertEquals('Стара Планина', result[6]); ...@@ -43,4 +43,3 @@ assertEquals('Стара Планина', result[6]);
assertEquals('ћук', result[7]); assertEquals('ћук', result[7]);
assertEquals('чука', result[8]); assertEquals('чука', result[8]);
assertEquals('џак', result[9]); assertEquals('џак', result[9]);
...@@ -57,4 +57,3 @@ collatorTime = endTime.getTime() - startTime.getTime(); ...@@ -57,4 +57,3 @@ collatorTime = endTime.getTime() - startTime.getTime();
assertTrue(collatorTime < cachedTime); assertTrue(collatorTime < cachedTime);
// Non-cached time is much slower, measured to 12.5 times. // Non-cached time is much slower, measured to 12.5 times.
assertTrue(cachedTime < nonCachedTime); assertTrue(cachedTime < nonCachedTime);
...@@ -82,5 +82,3 @@ function testShadowing(x, h) { ...@@ -82,5 +82,3 @@ function testShadowing(x, h) {
} }
testShadowing(1, function() { return 2; }); testShadowing(1, function() { return 2; });
...@@ -225,4 +225,3 @@ ...@@ -225,4 +225,3 @@
assertEquals(2, count); assertEquals(2, count);
})(); })();
...@@ -43,4 +43,3 @@ function TestNonSmiArrayLength() { ...@@ -43,4 +43,3 @@ function TestNonSmiArrayLength() {
} }
TestNonSmiArrayLength(); TestNonSmiArrayLength();
...@@ -76,4 +76,3 @@ Object.prototype.__defineSetter__('z', function(value) { result_z = value; }); ...@@ -76,4 +76,3 @@ Object.prototype.__defineSetter__('z', function(value) { result_z = value; });
o2.z = 27; o2.z = 27;
assertEquals(27, result_z); assertEquals(27, result_z);
assertTrue(typeof o2.z == 'undefined'); assertTrue(typeof o2.z == 'undefined');
...@@ -59,4 +59,3 @@ assertSame(undefined, Realm.eval(realmB, "Realm.shared.__proto__")); ...@@ -59,4 +59,3 @@ assertSame(undefined, Realm.eval(realmB, "Realm.shared.__proto__"));
Realm.eval(realmB, "Realm.shared.__proto__ = {c: 3}"); Realm.eval(realmB, "Realm.shared.__proto__ = {c: 3}");
assertSame(1, o.a); assertSame(1, o.a);
assertSame(undefined, o.c); assertSame(undefined, o.c);
...@@ -44,4 +44,3 @@ function test(n) { ...@@ -44,4 +44,3 @@ function test(n) {
test(1); test(1);
test(42); test(42);
test(239); test(239);
...@@ -47,4 +47,3 @@ for (var i in a) { ...@@ -47,4 +47,3 @@ for (var i in a) {
assertEquals(f < x, 'f' < x, ">r" + x); assertEquals(f < x, 'f' < x, ">r" + x);
assertEquals(f <= x, 'f' <= x, ">=r" + x); assertEquals(f <= x, 'f' <= x, ">=r" + x);
} }
...@@ -63,4 +63,3 @@ for (var i in b) { ...@@ -63,4 +63,3 @@ for (var i in b) {
"assertFalse(" + x + " >= NaN, '' + " + x + " + ' >= NaN');\n"; "assertFalse(" + x + " >= NaN, '' + " + x + " + ' >= NaN');\n";
eval(program); eval(program);
} }
...@@ -66,4 +66,3 @@ try { ...@@ -66,4 +66,3 @@ try {
} catch(e) { } catch(e) {
assertEquals("wow", e); assertEquals("wow", e);
} }
...@@ -38,4 +38,3 @@ function outer() { ...@@ -38,4 +38,3 @@ function outer() {
} }
outer(); outer();
...@@ -51,7 +51,3 @@ f(); ...@@ -51,7 +51,3 @@ f();
assertEquals(42, a[0]); assertEquals(42, a[0]);
assertEquals(49, a[7]); assertEquals(49, a[7]);
assertEquals(-19, a[23]); assertEquals(-19, a[23]);
...@@ -56,4 +56,3 @@ for (var i = 0; i < 3; i++) assertEquals(i, f(i)); ...@@ -56,4 +56,3 @@ for (var i = 0; i < 3; i++) assertEquals(i, f(i));
assertEquals(0, f(0)); assertEquals(0, f(0));
assertEquals(1, f(1)); assertEquals(1, f(1));
...@@ -33,4 +33,3 @@ function always_false() {} ...@@ -33,4 +33,3 @@ function always_false() {}
function test() { return always_false() ? 0 : 1; } function test() { return always_false() ? 0 : 1; }
assertEquals(1, test()); assertEquals(1, test());
...@@ -43,4 +43,3 @@ main(o.g); ...@@ -43,4 +43,3 @@ main(o.g);
main(o.g); main(o.g);
%OptimizeFunctionOnNextCall(main); %OptimizeFunctionOnNextCall(main);
main(o.g); main(o.g);
...@@ -42,4 +42,3 @@ assertEquals(G, f(G)); ...@@ -42,4 +42,3 @@ assertEquals(G, f(G));
assertEquals(G, f(G)); assertEquals(G, f(G));
%OptimizeFunctionOnNextCall(f); %OptimizeFunctionOnNextCall(f);
assertEquals(G, f(G)); assertEquals(G, f(G));
...@@ -306,5 +306,3 @@ assertEquals(ROR4(0xFFFFFFFF, 40), ROR4_sa40(0xFFFFFFFF)); ...@@ -306,5 +306,3 @@ assertEquals(ROR4(0xFFFFFFFF, 40), ROR4_sa40(0xFFFFFFFF));
assertEquals(ROR4(0xFFFFFFFF, 40), ROR4_sa40(0xFFFFFFFF)); assertEquals(ROR4(0xFFFFFFFF, 40), ROR4_sa40(0xFFFFFFFF));
%OptimizeFunctionOnNextCall(ROR4_sa40); %OptimizeFunctionOnNextCall(ROR4_sa40);
assertEquals(ROR4(0xFFFFFFFF, 40), ROR4_sa40(0xFFFFFFFF)); assertEquals(ROR4(0xFFFFFFFF, 40), ROR4_sa40(0xFFFFFFFF));
...@@ -169,4 +169,3 @@ ...@@ -169,4 +169,3 @@
} }
f("const x = 0;"); f("const x = 0;");
})(); })();
...@@ -62,4 +62,3 @@ a1.push(a2); ...@@ -62,4 +62,3 @@ a1.push(a2);
assertEquals("", a1.toString()); assertEquals("", a1.toString());
assertEquals("", a1.toLocaleString()); assertEquals("", a1.toLocaleString());
assertEquals("", a1.join()); assertEquals("", a1.join());
...@@ -222,4 +222,3 @@ for(var i = 0; i < scenario.length; i++) { ...@@ -222,4 +222,3 @@ for(var i = 0; i < scenario.length; i++) {
Debug.BreakPositionAlignment.BreakPosition).indexOf(scenario[i][1]) > 0); Debug.BreakPositionAlignment.BreakPosition).indexOf(scenario[i][1]) > 0);
Debug.clearBreakPoint(bp1); Debug.clearBreakPoint(bp1);
} }
...@@ -118,4 +118,3 @@ Debug.setListener(null); ...@@ -118,4 +118,3 @@ Debug.setListener(null);
assertFalse(exception, "exception in listener") assertFalse(exception, "exception in listener")
assertTrue(listenerComplete); assertTrue(listenerComplete);
...@@ -159,4 +159,3 @@ CheckNoScopeVisible(Function.toString); ...@@ -159,4 +159,3 @@ CheckNoScopeVisible(Function.toString);
// This getter is known to be implemented as closure. // This getter is known to be implemented as closure.
CheckNoScopeVisible(new Error().__lookupGetter__("stack")); CheckNoScopeVisible(new Error().__lookupGetter__("stack"));
...@@ -86,4 +86,3 @@ f(); ...@@ -86,4 +86,3 @@ f();
assertEquals(5, break_point_hit_count); assertEquals(5, break_point_hit_count);
f(); f();
assertEquals(6, break_point_hit_count); assertEquals(6, break_point_hit_count);
...@@ -66,5 +66,3 @@ assertEquals(8, z6()); ...@@ -66,5 +66,3 @@ assertEquals(8, z6());
var z100 = Factory(100)(); var z100 = Factory(100)();
assertEquals(102, z100()); assertEquals(102, z100());
...@@ -138,4 +138,3 @@ test = new TestBase("Test with C++ frame above ChooseAnimal frame"); ...@@ -138,4 +138,3 @@ test = new TestBase("Test with C++ frame above ChooseAnimal frame");
exception_holder = {}; exception_holder = {};
assertEquals("Cat", test.ChooseAnimal(WrapInNativeCall(WrapInDebuggerCall(WrapInCatcher(test.ScriptChanger, exception_holder))))); assertEquals("Cat", test.ChooseAnimal(WrapInNativeCall(WrapInDebuggerCall(WrapInCatcher(test.ScriptChanger, exception_holder)))));
assertTrue(!!exception_holder[0]); assertTrue(!!exception_holder[0]);
...@@ -56,5 +56,3 @@ assertEquals("Unexpected token )", ...@@ -56,5 +56,3 @@ assertEquals("Unexpected token )",
caught_exception.details.syntaxErrorMessage); caught_exception.details.syntaxErrorMessage);
assertEquals(2, caught_exception.details.position.start.line); assertEquals(2, caught_exception.details.position.start.line);
...@@ -110,4 +110,3 @@ CheckCompare( ...@@ -110,4 +110,3 @@ CheckCompare(
"yesterday\nall\nmy\ntroubles\nseemed\nso\nfar\naway", "yesterday\nall\nmy\ntroubles\nseemed\nso\nfar\naway",
"yesterday\nall\nmy\ntroubles\nseemed\nso\n" "yesterday\nall\nmy\ntroubles\nseemed\nso\n"
); );
...@@ -93,5 +93,3 @@ assertEquals(69, MultiChunkTranslator.Translate(59)); ...@@ -93,5 +93,3 @@ assertEquals(69, MultiChunkTranslator.Translate(59));
assertEquals(2010, MultiChunkTranslator.Translate(60, Return2010)); assertEquals(2010, MultiChunkTranslator.Translate(60, Return2010));
assertEquals(70, MultiChunkTranslator.Translate(70)); assertEquals(70, MultiChunkTranslator.Translate(70));
assertEquals(75, MultiChunkTranslator.Translate(75)); assertEquals(75, MultiChunkTranslator.Translate(75));
...@@ -82,4 +82,3 @@ debugger; ...@@ -82,4 +82,3 @@ debugger;
assertEquals([], listenerExceptions, "Exception in listener"); assertEquals([], listenerExceptions, "Exception in listener");
// Make sure that the debug event listener vas invoked. // Make sure that the debug event listener vas invoked.
assertEquals(2, listenerCallCount, "Listener not called"); assertEquals(2, listenerCallCount, "Listener not called");
...@@ -214,4 +214,3 @@ function SetBreakpointInI1Script() { ...@@ -214,4 +214,3 @@ function SetBreakpointInI1Script() {
// moment. Since there's no way of simply getting the pointer to the function, // moment. Since there's no way of simply getting the pointer to the function,
// we run this code while the script function is being activated on stack. // we run this code while the script function is being activated on stack.
eval('SetBreakpointInI1Script()\nfunction i1(){}\n\n\n\nfunction i2(){}\n'); eval('SetBreakpointInI1Script()\nfunction i1(){}\n\n\n\nfunction i2(){}\n');
...@@ -221,5 +221,3 @@ var fun = (function(p) { ...@@ -221,5 +221,3 @@ var fun = (function(p) {
}; };
})(Object); })(Object);
TestCaseWithDebugger(fun); TestCaseWithDebugger(fun);
...@@ -46,4 +46,3 @@ assertEquals(0.5, f(arr, 0)); ...@@ -46,4 +46,3 @@ assertEquals(0.5, f(arr, 0));
assertEquals(0.5, f(arr, 0)); assertEquals(0.5, f(arr, 0));
do_set = true; do_set = true;
assertEquals(2, f(arr, 1)); assertEquals(2, f(arr, 1));
...@@ -103,7 +103,3 @@ var expected = ['23', '42', // indexed from 'o' ...@@ -103,7 +103,3 @@ var expected = ['23', '42', // indexed from 'o'
var actual = []; var actual = [];
for (var p in o) actual.push(p); for (var p in o) actual.push(p);
assertArrayEquals(expected, actual); assertArrayEquals(expected, actual);
...@@ -51,4 +51,3 @@ assertEquals("x is not defined", ...@@ -51,4 +51,3 @@ assertEquals("x is not defined",
o.message = "another message"; o.message = "another message";
assertEquals("another message", o.message); assertEquals("another message", o.message);
assertEquals("x is not defined", error2.message); assertEquals("x is not defined", error2.message);
...@@ -201,4 +201,3 @@ try { ...@@ -201,4 +201,3 @@ try {
[true, false].verifyUndefined(frames, "getFileName"); [true, false].verifyUndefined(frames, "getFileName");
["eval at <anonymous> ("].verifyContains(frames, "getEvalOrigin"); ["eval at <anonymous> ("].verifyContains(frames, "getEvalOrigin");
} }
...@@ -50,5 +50,3 @@ for (var i = 0; i < 25; i++) { ...@@ -50,5 +50,3 @@ for (var i = 0; i < 25; i++) {
} }
assertEquals(expected, f.apply(null, array), String(i)); assertEquals(expected, f.apply(null, array), String(i));
} }
...@@ -34,4 +34,3 @@ var a = [0, 1, 2, 3, 4, 5]; ...@@ -34,4 +34,3 @@ var a = [0, 1, 2, 3, 4, 5];
assertTrue(%HasFastSmiElements(a)); assertTrue(%HasFastSmiElements(a));
a.length = (1 << 30); a.length = (1 << 30);
assertFalse(%HasFastSmiElements(a)); assertFalse(%HasFastSmiElements(a));
...@@ -37,6 +37,3 @@ f(); f(); f(); ...@@ -37,6 +37,3 @@ f(); f(); f();
for (var i=0; i<50; i++) { for (var i=0; i<50; i++) {
f(); f();
} }
...@@ -31,4 +31,3 @@ function strip(s) { ...@@ -31,4 +31,3 @@ function strip(s) {
assertEquals('function(){}', strip((function () { }).toString())); assertEquals('function(){}', strip((function () { }).toString()));
assertEquals('functionanonymous(){}', strip(new Function().toString())); assertEquals('functionanonymous(){}', strip(new Function().toString()));
...@@ -80,4 +80,3 @@ assertEquals(42, f(2, 21)); ...@@ -80,4 +80,3 @@ assertEquals(42, f(2, 21));
f = new Function(x, y, z); f = new Function(x, y, z);
assertEquals(25, f(5, 5)); assertEquals(25, f(5, 5));
assertEquals(42, f(2, 21)); assertEquals(42, f(2, 21));
...@@ -65,4 +65,3 @@ GetPrototypeOfObject(y); ...@@ -65,4 +65,3 @@ GetPrototypeOfObject(y);
GetPrototypeOfObject({x:5}); GetPrototypeOfObject({x:5});
GetPrototypeOfObject(F); GetPrototypeOfObject(F);
GetPrototypeOfObject(RegExp); GetPrototypeOfObject(RegExp);
...@@ -32,4 +32,3 @@ ...@@ -32,4 +32,3 @@
String.prototype.__defineGetter__('x', function() { return this; }); String.prototype.__defineGetter__('x', function() { return this; });
assertEquals(Object('asdf'), 'asdf'.x); assertEquals(Object('asdf'), 'asdf'.x);
...@@ -56,4 +56,3 @@ test({ y: 42 }, "function f() { eval('1'); assertEquals(27, x) }; f();"); ...@@ -56,4 +56,3 @@ test({ y: 42 }, "function f() { eval('1'); assertEquals(27, x) }; f();");
// in the eval scopes. Deeper nesting this time. // in the eval scopes. Deeper nesting this time.
test({ x: 42 }, "function f() { function g() { eval('1'); assertEquals(42, x) }; g() }; f();"); test({ x: 42 }, "function f() { function g() { eval('1'); assertEquals(42, x) }; g() }; f();");
test({ y: 42 }, "function f() { function g() { eval('1'); assertEquals(27, x) }; g() }; f();"); test({ y: 42 }, "function f() { function g() { eval('1'); assertEquals(27, x) }; g() }; f();");
...@@ -59,8 +59,3 @@ function testEvalDontShadow(source) { ...@@ -59,8 +59,3 @@ function testEvalDontShadow(source) {
eval('eval(' + source +')'); eval('eval(' + source +')');
} }
testEvalDontShadow('assertEquals(42, x)'); testEvalDontShadow('assertEquals(42, x)');
...@@ -53,4 +53,3 @@ var sizes = [0, 1, 2, 100, 200, 400, 1000]; ...@@ -53,4 +53,3 @@ var sizes = [0, 1, 2, 100, 200, 400, 1000];
for (var i = 0; i < sizes.length; i++) { for (var i = 0; i < sizes.length; i++) {
testLiteral(sizes[i]); testLiteral(sizes[i]);
} }
...@@ -36,4 +36,3 @@ test("assertEquals(27, x);"); ...@@ -36,4 +36,3 @@ test("assertEquals(27, x);");
test("(function() { assertEquals(27, x) })();"); test("(function() { assertEquals(27, x) })();");
test("(function() { var y = 42; eval('1'); assertEquals(42, y); })();"); test("(function() { var y = 42; eval('1'); assertEquals(42, y); })();");
test("(function() { var y = 42; eval('var y = 2; var z = 2;'); assertEquals(2, y); })();"); test("(function() { var y = 42; eval('var y = 2; var z = 2;'); assertEquals(2, y); })();");
...@@ -170,5 +170,3 @@ testRound(min_smi31, min_smi31 - 0.5); ...@@ -170,5 +170,3 @@ testRound(min_smi31, min_smi31 - 0.5);
testRound(min_smi31 + 1, min_smi31 + 0.5); testRound(min_smi31 + 1, min_smi31 + 0.5);
testRound(min_smi32, min_smi32 - 0.5); testRound(min_smi32, min_smi32 - 0.5);
testRound(min_smi32 + 1, min_smi32 + 0.5); testRound(min_smi32 + 1, min_smi32 + 0.5);
...@@ -50,4 +50,3 @@ test(-0, -0); ...@@ -50,4 +50,3 @@ test(-0, -0);
test(Infinity, Infinity); test(Infinity, Infinity);
// -Infinity is smaller than 0 so it should return NaN // -Infinity is smaller than 0 so it should return NaN
test(NaN, -Infinity); test(NaN, -Infinity);
...@@ -393,4 +393,3 @@ var assertUnoptimized; ...@@ -393,4 +393,3 @@ var assertUnoptimized;
} }
})(); })();
...@@ -97,7 +97,3 @@ function TestFloatQuietNan() { ...@@ -97,7 +97,3 @@ function TestFloatQuietNan() {
} }
TestFloatQuietNan(); TestFloatQuietNan();
...@@ -53,4 +53,3 @@ x = new String('foo'); ...@@ -53,4 +53,3 @@ x = new String('foo');
assertTrue(x === new Construct(x)); assertTrue(x === new Construct(x));
x = function() { }; x = function() { };
assertTrue(x === new Construct(x)); assertTrue(x === new Construct(x));
...@@ -42,5 +42,3 @@ assertEquals('asdfasdf', eval(code)); ...@@ -42,5 +42,3 @@ assertEquals('asdfasdf', eval(code));
// Allow LF+CR in multiline string literals. // Allow LF+CR in multiline string literals.
code = "'asdf\\" + String.fromCharCode(0xA) + String.fromCharCode(0xD) + "asdf'"; code = "'asdf\\" + String.fromCharCode(0xA) + String.fromCharCode(0xD) + "asdf'";
assertEquals('asdfasdf', eval(code)); assertEquals('asdfasdf', eval(code));
...@@ -362,6 +362,3 @@ testToPrecision("-1.234e+4", Number(-12344.67), (4)); ...@@ -362,6 +362,3 @@ testToPrecision("-1.234e+4", Number(-12344.67), (4));
// dtoa does not do this in its original form. // dtoa does not do this in its original form.
assertEquals("1.3", 1.25.toPrecision(2), "1.25.toPrecision(2)"); assertEquals("1.3", 1.25.toPrecision(2), "1.25.toPrecision(2)");
assertEquals("1.4", 1.35.toPrecision(2), "1.35.toPrecision(2)"); assertEquals("1.4", 1.35.toPrecision(2), "1.35.toPrecision(2)");
...@@ -392,4 +392,3 @@ Number(-12344.67).toPrecision(4); ...@@ -392,4 +392,3 @@ Number(-12344.67).toPrecision(4);
(-91.1234).toPrecision(6); (-91.1234).toPrecision(6);
(-91.1234).toPrecision(7); (-91.1234).toPrecision(7);
(-91.1234).toPrecision(8); (-91.1234).toPrecision(8);
...@@ -335,6 +335,3 @@ assertEquals("-1.234e+4", Number(-12344.67).toPrecision(4)); ...@@ -335,6 +335,3 @@ assertEquals("-1.234e+4", Number(-12344.67).toPrecision(4));
// dtoa does not do this in its original form. // dtoa does not do this in its original form.
assertEquals("1.3", 1.25.toPrecision(2), "1.25.toPrecision(2)"); assertEquals("1.3", 1.25.toPrecision(2), "1.25.toPrecision(2)");
assertEquals("1.4", 1.35.toPrecision(2), "1.35.toPrecision(2)"); assertEquals("1.4", 1.35.toPrecision(2), "1.35.toPrecision(2)");
...@@ -43,4 +43,3 @@ var test6 = { 17.31: function() {}, "17.31": 7 }; ...@@ -43,4 +43,3 @@ var test6 = { 17.31: function() {}, "17.31": 7 };
assertEquals(7, test5[13]); assertEquals(7, test5[13]);
assertEquals(7, test6[17.31]); assertEquals(7, test6[17.31]);
...@@ -63,4 +63,3 @@ var sizes = [0, 1, 2, 100, 200, 400, 1000]; ...@@ -63,4 +63,3 @@ var sizes = [0, 1, 2, 100, 200, 400, 1000];
for (var i = 0; i < sizes.length; i++) { for (var i = 0; i < sizes.length; i++) {
testLiteral(sizes[i]); testLiteral(sizes[i]);
} }
...@@ -109,4 +109,3 @@ if (has_packed_elements) { ...@@ -109,4 +109,3 @@ if (has_packed_elements) {
test_with_optimization(test5); test_with_optimization(test5);
test_with_optimization(test6); test_with_optimization(test6);
} }
...@@ -33,4 +33,3 @@ object[key] = 87; ...@@ -33,4 +33,3 @@ object[key] = 87;
assertEquals(87, object[key]); assertEquals(87, object[key]);
object[key]++; object[key]++;
assertEquals(88, object[key]); assertEquals(88, object[key]);
...@@ -89,5 +89,3 @@ var test = new Object; ...@@ -89,5 +89,3 @@ var test = new Object;
test.__proto__ = (new Array()).__proto__; test.__proto__ = (new Array()).__proto__;
test.length = 14; test.length = 14;
assertEquals(14, test.length); assertEquals(14, test.length);
...@@ -75,4 +75,3 @@ assertEquals("Friends,", words[0]); ...@@ -75,4 +75,3 @@ assertEquals("Friends,", words[0]);
words[0] = "Enemies,"; words[0] = "Enemies,";
words = string.split(" "); words = string.split(" ");
assertEquals("Friends,", words[0]); assertEquals("Friends,", words[0]);
...@@ -33,4 +33,3 @@ ...@@ -33,4 +33,3 @@
// to store the 33rd character. This fails an ASSERT in debug mode. // to store the 33rd character. This fails an ASSERT in debug mode.
assertEquals(33, "12345678901234567890123456789012\u2028".length); assertEquals(33, "12345678901234567890123456789012\u2028".length);
...@@ -41,4 +41,3 @@ object.toString = custom_toString; ...@@ -41,4 +41,3 @@ object.toString = custom_toString;
assertEquals(2, Number(object)); assertEquals(2, Number(object));
assertEquals('I', String(object)[0]); assertEquals('I', String(object)[0]);
...@@ -34,4 +34,3 @@ function Crash() { ...@@ -34,4 +34,3 @@ function Crash() {
} }
Crash(); Crash();
...@@ -32,4 +32,3 @@ this.w = 0; ...@@ -32,4 +32,3 @@ this.w = 0;
this.x = 1; this.x = 1;
this.y = 2; this.y = 2;
this.z = 3; this.z = 3;
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment