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

Unified Diff: test/cctest/test-utils.cc

Issue 115860: Change RelocInfo to write 64-bit data field on x64 architecture. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 7 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/globals.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-utils.cc
===================================================================
--- test/cctest/test-utils.cc (revision 2079)
+++ test/cctest/test-utils.cc (working copy)
@@ -152,6 +152,13 @@
CHECK_EQ(0, FastD2I(0.345));
CHECK_EQ(1, FastD2I(1.234));
CHECK_EQ(1000000, FastD2I(1000000.123));
+ // Check that >> is implemented as arithmetic shift right.
+ // If this is not true, then ArithmeticShiftRight() must be changed,
+ // There are also documented right shifts in assembler.cc of
+ // int8_t and intptr_t signed integers.
+ CHECK_EQ(-2, -8 >> 2);
+ CHECK_EQ(-2, static_cast<int8_t>(-8) >> 2);
+ CHECK_EQ(-2, static_cast<intptr_t>(-8) >> 2);
}
@@ -177,32 +184,3 @@
buffer.Dispose();
}
}
-
-
-// Issue 358: When copying EmbeddedVector, Vector::start_ must point
-// to the buffer in the copy, not in the source.
-TEST(EmbeddedVectorCopy) {
- EmbeddedVector<int, 1> src;
- src[0] = 100;
- EmbeddedVector<int, 1> dst = src;
- CHECK_NE(src.start(), dst.start());
- CHECK_EQ(src[0], dst[0]);
- src[0] = 200;
- CHECK_NE(src[0], dst[0]);
-}
-
-
-// Also Issue 358, assignment case.
-TEST(EmbeddedVectorAssign) {
- EmbeddedVector<int, 1> src;
- src[0] = 100;
- EmbeddedVector<int, 1> dst;
- dst[0] = 200;
- CHECK_NE(src.start(), dst.start());
- CHECK_NE(src[0], dst[0]);
- dst = src;
- CHECK_NE(src.start(), dst.start());
- CHECK_EQ(src[0], dst[0]);
- src[0] = 200;
- CHECK_NE(src[0], dst[0]);
-}
« no previous file with comments | « src/globals.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698