Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(113)

Unified Diff: test/mjsunit/regress/d8-readbuffer.js

Issue 127853003: Fix d8's Shell::ReadBuffer after r18227 (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: year++ ;-) Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/d8.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/regress/d8-readbuffer.js
diff --git a/test/mjsunit/compiler/regress-lbranch-double.js b/test/mjsunit/regress/d8-readbuffer.js
similarity index 77%
copy from test/mjsunit/compiler/regress-lbranch-double.js
copy to test/mjsunit/regress/d8-readbuffer.js
index dca6d5bace7da4c5f8f20c5b6eb4902da243e40d..8aec02dcac5893c9e4f62da80a77332859fc4fb7 100644
--- a/test/mjsunit/compiler/regress-lbranch-double.js
+++ b/test/mjsunit/regress/d8-readbuffer.js
@@ -1,4 +1,4 @@
-// Copyright 2011 the V8 project authors. All rights reserved.
+// Copyright 2014 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
@@ -25,16 +25,16 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --allow-natives-syntax
+// Test that reading a file actually returns the file's contents.
-// ARM's code generator for LBranch had a bug, swapping the true/false
-// branches when the representation of the condition is a double.
+// Env: TEST_FILE_NAME
+assertEquals("string", typeof TEST_FILE_NAME);
-function foo() {
- return Math.sqrt(2.6415) ? 88 : 99;
-}
+var a = new Uint8Array(readbuffer(TEST_FILE_NAME));
+
+// First line of this file.
+var expected = "// Copyright 2014 the V8 project authors. All rights reserved.";
-assertEquals(88, foo());
-assertEquals(88, foo());
-%OptimizeFunctionOnNextCall(foo)
-assertEquals(88, foo());
+for (var i = 0; i < expected.length; i++) {
+ assertEquals(expected.charCodeAt(i), a[i]);
+}
« no previous file with comments | « src/d8.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698