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

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

Issue 24584004: Remove unused function MoveBytes(). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 3 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/v8utils.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
diff --git a/test/cctest/test-utils.cc b/test/cctest/test-utils.cc
index feff47793391b0909bf14732b893a5706ac89114..86d52fa82b157856517db557c9efa836035d9fba 100644
--- a/test/cctest/test-utils.cc
+++ b/test/cctest/test-utils.cc
@@ -103,35 +103,22 @@ static const int kAreaSize = 512;
void TestMemMove(byte* area1,
byte* area2,
- byte* area3,
int src_offset,
int dest_offset,
int length) {
for (int i = 0; i < kAreaSize; i++) {
area1[i] = i & 0xFF;
area2[i] = i & 0xFF;
- area3[i] = i & 0xFF;
}
OS::MemMove(area1 + dest_offset, area1 + src_offset, length);
- MoveBytes(area2 + dest_offset, area2 + src_offset, length);
- memmove(area3 + dest_offset, area3 + src_offset, length);
- if (memcmp(area1, area3, kAreaSize) != 0) {
+ memmove(area2 + dest_offset, area2 + src_offset, length);
+ if (memcmp(area1, area2, kAreaSize) != 0) {
printf("OS::MemMove(): src_offset: %d, dest_offset: %d, length: %d\n",
src_offset, dest_offset, length);
for (int i = 0; i < kAreaSize; i++) {
- if (area1[i] == area3[i]) continue;
+ if (area1[i] == area2[i]) continue;
printf("diff at offset %d (%p): is %d, should be %d\n",
- i, reinterpret_cast<void*>(area1 + i), area1[i], area3[i]);
- }
- CHECK(false);
- }
- if (memcmp(area2, area3, kAreaSize) != 0) {
- printf("MoveBytes(): src_offset: %d, dest_offset: %d, length: %d\n",
- src_offset, dest_offset, length);
- for (int i = 0; i < kAreaSize; i++) {
- if (area2[i] == area3[i]) continue;
- printf("diff at offset %d (%p): is %d, should be %d\n",
- i, reinterpret_cast<void*>(area2 + i), area2[i], area3[i]);
+ i, reinterpret_cast<void*>(area1 + i), area1[i], area2[i]);
}
CHECK(false);
}
@@ -142,7 +129,6 @@ TEST(MemMove) {
v8::V8::Initialize();
byte* area1 = new byte[kAreaSize];
byte* area2 = new byte[kAreaSize];
- byte* area3 = new byte[kAreaSize];
static const int kMinOffset = 32;
static const int kMaxOffset = 64;
@@ -152,13 +138,12 @@ TEST(MemMove) {
for (int src_offset = kMinOffset; src_offset <= kMaxOffset; src_offset++) {
for (int dst_offset = kMinOffset; dst_offset <= kMaxOffset; dst_offset++) {
for (int length = 0; length <= kMaxLength; length++) {
- TestMemMove(area1, area2, area3, src_offset, dst_offset, length);
+ TestMemMove(area1, area2, src_offset, dst_offset, length);
}
}
}
delete[] area1;
delete[] area2;
- delete[] area3;
}
« no previous file with comments | « src/v8utils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698