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/base/platform/time.h" | 7 #include "src/base/platform/time.h" |
8 #include "src/flags.h" | 8 #include "src/flags.h" |
9 #include "src/isolate-inl.h" | 9 #include "src/isolate-inl.h" |
10 | 10 |
11 namespace v8 { | 11 namespace v8 { |
12 | 12 |
13 std::ostream& operator<<(std::ostream& os, ExternalArrayType type) { | |
14 switch (type) { | |
15 case kExternalInt8Array: | |
16 return os << "ExternalInt8Array"; | |
17 case kExternalUint8Array: | |
18 return os << "ExternalUint8Array"; | |
19 case kExternalInt16Array: | |
20 return os << "ExternalInt16Array"; | |
21 case kExternalUint16Array: | |
22 return os << "ExternalUint16Array"; | |
23 case kExternalInt32Array: | |
24 return os << "ExternalInt32Array"; | |
25 case kExternalUint32Array: | |
26 return os << "ExternalUint32Array"; | |
27 case kExternalFloat32Array: | |
28 return os << "ExternalFloat32Array"; | |
29 case kExternalFloat64Array: | |
30 return os << "ExternalFloat64Array"; | |
31 case kExternalUint8ClampedArray: | |
32 return os << "ExternalUint8ClampedArray"; | |
33 } | |
34 UNREACHABLE(); | |
35 return os; | |
36 } | |
37 | |
38 | |
39 // static | 13 // static |
40 Isolate* TestWithIsolate::isolate_ = NULL; | 14 Isolate* TestWithIsolate::isolate_ = NULL; |
41 | 15 |
42 | 16 |
43 TestWithIsolate::TestWithIsolate() | 17 TestWithIsolate::TestWithIsolate() |
44 : isolate_scope_(isolate()), handle_scope_(isolate()) {} | 18 : isolate_scope_(isolate()), handle_scope_(isolate()) {} |
45 | 19 |
46 | 20 |
47 TestWithIsolate::~TestWithIsolate() {} | 21 TestWithIsolate::~TestWithIsolate() {} |
48 | 22 |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 | 75 |
102 base::RandomNumberGenerator* TestWithIsolate::random_number_generator() const { | 76 base::RandomNumberGenerator* TestWithIsolate::random_number_generator() const { |
103 return isolate()->random_number_generator(); | 77 return isolate()->random_number_generator(); |
104 } | 78 } |
105 | 79 |
106 | 80 |
107 TestWithZone::~TestWithZone() {} | 81 TestWithZone::~TestWithZone() {} |
108 | 82 |
109 } // namespace internal | 83 } // namespace internal |
110 } // namespace v8 | 84 } // namespace v8 |
OLD | NEW |