OLD | NEW |
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 the V8 project authors. All rights reserved. |
2 // | 2 // |
3 // Tests of logging utilities from log-utils.h | 3 // Tests of logging utilities from log-utils.h |
4 | 4 |
5 #ifdef ENABLE_LOGGING_AND_PROFILING | |
6 | |
7 #include "v8.h" | 5 #include "v8.h" |
8 | 6 |
9 #include "log-utils.h" | 7 #include "log-utils.h" |
10 #include "cctest.h" | 8 #include "cctest.h" |
11 | 9 |
12 using v8::internal::CStrVector; | 10 using v8::internal::CStrVector; |
13 using v8::internal::EmbeddedVector; | 11 using v8::internal::EmbeddedVector; |
14 using v8::internal::LogDynamicBuffer; | 12 using v8::internal::LogDynamicBuffer; |
15 using v8::internal::MutableCStrVector; | 13 using v8::internal::MutableCStrVector; |
16 using v8::internal::ScopedVector; | 14 using v8::internal::ScopedVector; |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 EmbeddedVector<char, 100> buf; | 127 EmbeddedVector<char, 100> buf; |
130 CHECK_EQ(100, ReadData(&dynabuf, 0, &buf)); | 128 CHECK_EQ(100, ReadData(&dynabuf, 0, &buf)); |
131 CHECK_EQ(ref_buf, buf); | 129 CHECK_EQ(ref_buf, buf); |
132 // Check the seal. | 130 // Check the seal. |
133 EmbeddedVector<char, 50> seal_buf; | 131 EmbeddedVector<char, 50> seal_buf; |
134 CHECK_EQ(seal_size, ReadData(&dynabuf, 100, &seal_buf)); | 132 CHECK_EQ(seal_size, ReadData(&dynabuf, 100, &seal_buf)); |
135 CHECK_EQ(CStrVector(seal), seal_buf.SubVector(0, seal_size)); | 133 CHECK_EQ(CStrVector(seal), seal_buf.SubVector(0, seal_size)); |
136 // Verify that there's no data beyond the seal. | 134 // Verify that there's no data beyond the seal. |
137 CHECK_EQ(0, ReadData(&dynabuf, 100 + seal_size, &buf)); | 135 CHECK_EQ(0, ReadData(&dynabuf, 100 + seal_size, &buf)); |
138 } | 136 } |
139 | |
140 #endif // ENABLE_LOGGING_AND_PROFILING | |
OLD | NEW |