| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium 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 <stdio.h> | 5 #include <stdio.h> |
| 6 #include <stdlib.h> | 6 #include <stdlib.h> |
| 7 #include <algorithm> // for min() | 7 #include <algorithm> // for min() |
| 8 | 8 |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/googletest/include/gtest/gtest.h" |
| 11 | 11 |
| 12 // Number of bits in a size_t. | 12 // Number of bits in a size_t. |
| 13 static const int kSizeBits = 8 * sizeof(size_t); | 13 static const int kSizeBits = 8 * sizeof(size_t); |
| 14 // The maximum size of a size_t. | 14 // The maximum size of a size_t. |
| 15 static const size_t kMaxSize = ~static_cast<size_t>(0); | 15 static const size_t kMaxSize = ~static_cast<size_t>(0); |
| 16 // Maximum positive size of a size_t if it were signed. | 16 // Maximum positive size of a size_t if it were signed. |
| 17 static const size_t kMaxSignedSize = ((size_t(1) << (kSizeBits-1)) - 1); | 17 static const size_t kMaxSignedSize = ((size_t(1) << (kSizeBits-1)) - 1); |
| 18 | 18 |
| 19 namespace { | 19 namespace { |
| 20 | 20 |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 _aligned_free(ptr); | 236 _aligned_free(ptr); |
| 237 _aligned_free(ptr2); | 237 _aligned_free(ptr2); |
| 238 } | 238 } |
| 239 } | 239 } |
| 240 } | 240 } |
| 241 | 241 |
| 242 int main(int argc, char** argv) { | 242 int main(int argc, char** argv) { |
| 243 testing::InitGoogleTest(&argc, argv); | 243 testing::InitGoogleTest(&argc, argv); |
| 244 return RUN_ALL_TESTS(); | 244 return RUN_ALL_TESTS(); |
| 245 } | 245 } |
| OLD | NEW |