OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 The LibYuv Project Authors. All rights reserved. | 2 * Copyright 2011 The LibYuv Project Authors. All rights reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
11 #include "../unit_test/unit_test.h" | 11 #include "../unit_test/unit_test.h" |
12 | 12 |
13 #include <stdlib.h> // For getenv() | 13 #include <stdlib.h> // For getenv() |
14 | 14 |
15 #include <cstring> | 15 #include <cstring> |
16 | 16 |
17 #include "gflags/gflags.h" | 17 #include "gflags/gflags.h" |
18 #include "testing/gtest/include/gtest/gtest.h" | |
19 | 18 |
20 // Change this to 1000 for benchmarking. | 19 // Change this to 1000 for benchmarking. |
21 // TODO(fbarchard): Add command line parsing to pass this as option. | 20 // TODO(fbarchard): Add command line parsing to pass this as option. |
22 #define BENCHMARK_ITERATIONS 1 | 21 #define BENCHMARK_ITERATIONS 1 |
23 | 22 |
24 int fastrand_seed = 0xfb; | 23 int fastrand_seed = 0xfb; |
25 | 24 |
26 DEFINE_int32(libyuv_width, 0, "width of test image."); | 25 DEFINE_int32(libyuv_width, 0, "width of test image."); |
27 DEFINE_int32(libyuv_height, 0, "height of test image."); | 26 DEFINE_int32(libyuv_height, 0, "height of test image."); |
28 DEFINE_int32(libyuv_repeat, 0, "number of times to repeat test."); | 27 DEFINE_int32(libyuv_repeat, 0, "number of times to repeat test."); |
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
347 } | 346 } |
348 | 347 |
349 int main(int argc, char** argv) { | 348 int main(int argc, char** argv) { |
350 ::testing::InitGoogleTest(&argc, argv); | 349 ::testing::InitGoogleTest(&argc, argv); |
351 // AllowCommandLineParsing allows us to ignore flags passed on to us by | 350 // AllowCommandLineParsing allows us to ignore flags passed on to us by |
352 // Chromium build bots without having to explicitly disable them. | 351 // Chromium build bots without having to explicitly disable them. |
353 google::AllowCommandLineReparsing(); | 352 google::AllowCommandLineReparsing(); |
354 google::ParseCommandLineFlags(&argc, &argv, true); | 353 google::ParseCommandLineFlags(&argc, &argv, true); |
355 return RUN_ALL_TESTS(); | 354 return RUN_ALL_TESTS(); |
356 } | 355 } |
OLD | NEW |