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

Side by Side Diff: test/cctest/compiler/test-operator.cc

Issue 1221433021: Move SmartPointer to base. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Remove some unecessary header includes Created 5 years, 5 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
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 <sstream> 5 #include <sstream>
6 6
7 #include "src/v8.h" 7 #include "src/v8.h"
8 8
9 #include "src/compiler/operator.h" 9 #include "src/compiler/operator.h"
10 #include "test/cctest/cctest.h" 10 #include "test/cctest/cctest.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 CHECK(!op1b.Equals(&op2a)); 62 CHECK(!op1b.Equals(&op2a));
63 CHECK(!op1b.Equals(&op2b)); 63 CHECK(!op1b.Equals(&op2b));
64 64
65 CHECK(!op2a.Equals(&op1a)); 65 CHECK(!op2a.Equals(&op1a));
66 CHECK(!op2a.Equals(&op1b)); 66 CHECK(!op2a.Equals(&op1b));
67 CHECK(!op2b.Equals(&op1a)); 67 CHECK(!op2b.Equals(&op1a));
68 CHECK(!op2b.Equals(&op1b)); 68 CHECK(!op2b.Equals(&op1b));
69 } 69 }
70 70
71 71
72 static SmartArrayPointer<const char> OperatorToString(Operator* op) { 72 static v8::base::SmartArrayPointer<const char> OperatorToString(Operator* op) {
73 std::ostringstream os; 73 std::ostringstream os;
74 os << *op; 74 os << *op;
75 return SmartArrayPointer<const char>(StrDup(os.str().c_str())); 75 return v8::base::SmartArrayPointer<const char>(StrDup(os.str().c_str()));
76 } 76 }
77 77
78 78
79 TEST(TestOperator_Print) { 79 TEST(TestOperator_Print) {
80 Operator op1a(19, NONE, "Another1", 0, 0, 0, 0, 0, 0); 80 Operator op1a(19, NONE, "Another1", 0, 0, 0, 0, 0, 0);
81 Operator op1b(19, FOLD, "Another2", 2, 0, 0, 2, 0, 0); 81 Operator op1b(19, FOLD, "Another2", 2, 0, 0, 2, 0, 0);
82 82
83 CHECK_EQ(0, strcmp("Another1", OperatorToString(&op1a).get())); 83 CHECK_EQ(0, strcmp("Another1", OperatorToString(&op1a).get()));
84 CHECK_EQ(0, strcmp("Another2", OperatorToString(&op1b).get())); 84 CHECK_EQ(0, strcmp("Another2", OperatorToString(&op1b).get()));
85 85
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 TEST(Operator_CountsOrder) { 274 TEST(Operator_CountsOrder) {
275 Operator op(29, NONE, "Flashy", 11, 22, 33, 44, 55, 66); 275 Operator op(29, NONE, "Flashy", 11, 22, 33, 44, 55, 66);
276 CHECK_EQ(11, op.ValueInputCount()); 276 CHECK_EQ(11, op.ValueInputCount());
277 CHECK_EQ(22, op.EffectInputCount()); 277 CHECK_EQ(22, op.EffectInputCount());
278 CHECK_EQ(33, op.ControlInputCount()); 278 CHECK_EQ(33, op.ControlInputCount());
279 279
280 CHECK_EQ(44, op.ValueOutputCount()); 280 CHECK_EQ(44, op.ValueOutputCount());
281 CHECK_EQ(55, op.EffectOutputCount()); 281 CHECK_EQ(55, op.EffectOutputCount());
282 CHECK_EQ(66, op.ControlOutputCount()); 282 CHECK_EQ(66, op.ControlOutputCount());
283 } 283 }
OLDNEW
« BUILD.gn ('K') | « src/strings-storage.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698