OLD | NEW |
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 "test/unittests/test-utils.h" | 5 #include "test/unittests/test-utils.h" |
6 | 6 |
7 #include "src/isolate-inl.h" | 7 #include "src/isolate-inl.h" |
8 | 8 |
9 namespace v8 { | 9 namespace v8 { |
10 | 10 |
11 std::ostream& operator<<(std::ostream& os, ExternalArrayType type) { | |
12 switch (type) { | |
13 case kExternalInt8Array: | |
14 return os << "ExternalInt8Array"; | |
15 case kExternalUint8Array: | |
16 return os << "ExternalUint8Array"; | |
17 case kExternalInt16Array: | |
18 return os << "ExternalInt16Array"; | |
19 case kExternalUint16Array: | |
20 return os << "ExternalUint16Array"; | |
21 case kExternalInt32Array: | |
22 return os << "ExternalInt32Array"; | |
23 case kExternalUint32Array: | |
24 return os << "ExternalUint32Array"; | |
25 case kExternalFloat32Array: | |
26 return os << "ExternalFloat32Array"; | |
27 case kExternalFloat64Array: | |
28 return os << "ExternalFloat64Array"; | |
29 case kExternalUint8ClampedArray: | |
30 return os << "ExternalUint8ClampedArray"; | |
31 } | |
32 UNREACHABLE(); | |
33 return os; | |
34 } | |
35 | |
36 | |
37 // static | 11 // static |
38 Isolate* TestWithIsolate::isolate_ = NULL; | 12 Isolate* TestWithIsolate::isolate_ = NULL; |
39 | 13 |
40 | 14 |
41 TestWithIsolate::TestWithIsolate() | 15 TestWithIsolate::TestWithIsolate() |
42 : isolate_scope_(isolate()), handle_scope_(isolate()) {} | 16 : isolate_scope_(isolate()), handle_scope_(isolate()) {} |
43 | 17 |
44 | 18 |
45 TestWithIsolate::~TestWithIsolate() {} | 19 TestWithIsolate::~TestWithIsolate() {} |
46 | 20 |
(...skipping 28 matching lines...) Expand all Loading... |
75 TestWithIsolate::~TestWithIsolate() {} | 49 TestWithIsolate::~TestWithIsolate() {} |
76 | 50 |
77 | 51 |
78 Factory* TestWithIsolate::factory() const { return isolate()->factory(); } | 52 Factory* TestWithIsolate::factory() const { return isolate()->factory(); } |
79 | 53 |
80 | 54 |
81 TestWithZone::~TestWithZone() {} | 55 TestWithZone::~TestWithZone() {} |
82 | 56 |
83 } // namespace internal | 57 } // namespace internal |
84 } // namespace v8 | 58 } // namespace v8 |
OLD | NEW |