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

Side by Side Diff: src/compiler/instruction-selector-unittest.cc

Issue 540823002: Refactor common unit test code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fixes Created 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler/instruction-selector-unittest.h" 5 #include "src/compiler/instruction-selector-unittest.h"
6 6
7 #include "src/compiler/compiler-test-utils.h"
7 #include "src/flags.h" 8 #include "src/flags.h"
8 9
9 namespace v8 { 10 namespace v8 {
10 namespace internal { 11 namespace internal {
11 namespace compiler { 12 namespace compiler {
12 13
13 namespace { 14 namespace {
14 15
15 typedef RawMachineAssembler::Label MLabel; 16 typedef RawMachineAssembler::Label MLabel;
16 17
17 } // namespace 18 } // namespace
18 19
19 20
20 InstructionSelectorTest::InstructionSelectorTest() : rng_(FLAG_random_seed) {} 21 InstructionSelectorTest::InstructionSelectorTest() : rng_(FLAG_random_seed) {}
21 22
22 23
24 InstructionSelectorTest::~InstructionSelectorTest() {}
25
26
23 InstructionSelectorTest::Stream InstructionSelectorTest::StreamBuilder::Build( 27 InstructionSelectorTest::Stream InstructionSelectorTest::StreamBuilder::Build(
24 InstructionSelector::Features features, 28 InstructionSelector::Features features,
25 InstructionSelectorTest::StreamBuilderMode mode) { 29 InstructionSelectorTest::StreamBuilderMode mode) {
26 Schedule* schedule = Export(); 30 Schedule* schedule = Export();
27 if (FLAG_trace_turbo) { 31 if (FLAG_trace_turbo) {
28 OFStream out(stdout); 32 OFStream out(stdout);
29 out << "=== Schedule before instruction selection ===" << endl << *schedule; 33 out << "=== Schedule before instruction selection ===" << endl << *schedule;
30 } 34 }
31 EXPECT_NE(0, graph()->NodeCount()); 35 EXPECT_NE(0, graph()->NodeCount());
32 CompilationInfo info(test_->isolate(), test_->zone()); 36 CompilationInfo info(test_->isolate(), test_->zone());
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 EXPECT_EQ(context2->id(), s.ToVreg(call_instr->InputAt(11))); 486 EXPECT_EQ(context2->id(), s.ToVreg(call_instr->InputAt(11)));
483 // Continuation. 487 // Continuation.
484 488
485 EXPECT_EQ(kArchRet, s[index++]->arch_opcode()); 489 EXPECT_EQ(kArchRet, s[index++]->arch_opcode());
486 EXPECT_EQ(index, s.size()); 490 EXPECT_EQ(index, s.size());
487 } 491 }
488 492
489 } // namespace compiler 493 } // namespace compiler
490 } // namespace internal 494 } // namespace internal
491 } // namespace v8 495 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/instruction-selector-unittest.h ('k') | src/compiler/machine-operator-reducer-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698