Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(573)

Side by Side Diff: unit_test/unit_test.h

Issue 1399523004: break up unittests into categories (Closed) Base URL: https://chromium.googlesource.com/libyuv/libyuv@master
Patch Set: bump version Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « unit_test/scale_test.cc ('k') | unit_test/unit_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 int64 i; 65 int64 i;
66 for (i = 0; i < len - 1; i += 2) { 66 for (i = 0; i < len - 1; i += 2) {
67 *reinterpret_cast<uint16*>(dst) = fastrand(); 67 *reinterpret_cast<uint16*>(dst) = fastrand();
68 dst += 2; 68 dst += 2;
69 } 69 }
70 for (; i < len; ++i) { 70 for (; i < len; ++i) {
71 *dst++ = fastrand(); 71 *dst++ = fastrand();
72 } 72 }
73 } 73 }
74 74
75 class libyuvTest : public ::testing::Test { 75 class LibYUVConvertTest : public ::testing::Test {
76 protected: 76 protected:
77 libyuvTest(); 77 LibYUVConvertTest();
78 78
79 const int rotate_max_w_; 79 const int rotate_max_w_;
80 const int rotate_max_h_; 80 const int rotate_max_h_;
81
82 int benchmark_iterations_; // Default 1. Use 1000 for benchmarking.
83 int benchmark_width_; // Default 1280. Use 640 for benchmarking VGA.
84 int benchmark_height_; // Default 720. Use 360 for benchmarking VGA.
85 int benchmark_pixels_div256_; // Total pixels to benchmark / 256.
86 int benchmark_pixels_div1280_; // Total pixels to benchmark / 1280.
87 int disable_cpu_flags_; // Default 0. Use -1 for benchmarking.
88 };
89
90 class LibYUVScaleTest : public ::testing::Test {
91 protected:
92 LibYUVScaleTest();
93
94 const int rotate_max_w_;
95 const int rotate_max_h_;
96
97 int benchmark_iterations_; // Default 1. Use 1000 for benchmarking.
98 int benchmark_width_; // Default 1280. Use 640 for benchmarking VGA.
99 int benchmark_height_; // Default 720. Use 360 for benchmarking VGA.
100 int benchmark_pixels_div256_; // Total pixels to benchmark / 256.
101 int benchmark_pixels_div1280_; // Total pixels to benchmark / 1280.
102 int disable_cpu_flags_; // Default 0. Use -1 for benchmarking.
103 };
104
105 class LibYUVRotateTest : public ::testing::Test {
106 protected:
107 LibYUVRotateTest();
108
109 const int rotate_max_w_;
110 const int rotate_max_h_;
111
112 int benchmark_iterations_; // Default 1. Use 1000 for benchmarking.
113 int benchmark_width_; // Default 1280. Use 640 for benchmarking VGA.
114 int benchmark_height_; // Default 720. Use 360 for benchmarking VGA.
115 int benchmark_pixels_div256_; // Total pixels to benchmark / 256.
116 int benchmark_pixels_div1280_; // Total pixels to benchmark / 1280.
117 int disable_cpu_flags_; // Default 0. Use -1 for benchmarking.
118 };
119
120 class LibYUVPlanarTest : public ::testing::Test {
121 protected:
122 LibYUVPlanarTest();
123
124 const int rotate_max_w_;
125 const int rotate_max_h_;
126
127 int benchmark_iterations_; // Default 1. Use 1000 for benchmarking.
128 int benchmark_width_; // Default 1280. Use 640 for benchmarking VGA.
129 int benchmark_height_; // Default 720. Use 360 for benchmarking VGA.
130 int benchmark_pixels_div256_; // Total pixels to benchmark / 256.
131 int benchmark_pixels_div1280_; // Total pixels to benchmark / 1280.
132 int disable_cpu_flags_; // Default 0. Use -1 for benchmarking.
133 };
134
135 class LibYUVBaseTest : public ::testing::Test {
136 protected:
137 LibYUVBaseTest();
138
139 const int rotate_max_w_;
140 const int rotate_max_h_;
81 141
82 int benchmark_iterations_; // Default 1. Use 1000 for benchmarking. 142 int benchmark_iterations_; // Default 1. Use 1000 for benchmarking.
83 int benchmark_width_; // Default 1280. Use 640 for benchmarking VGA. 143 int benchmark_width_; // Default 1280. Use 640 for benchmarking VGA.
84 int benchmark_height_; // Default 720. Use 360 for benchmarking VGA. 144 int benchmark_height_; // Default 720. Use 360 for benchmarking VGA.
85 int benchmark_pixels_div256_; // Total pixels to benchmark / 256. 145 int benchmark_pixels_div256_; // Total pixels to benchmark / 256.
86 int benchmark_pixels_div1280_; // Total pixels to benchmark / 1280. 146 int benchmark_pixels_div1280_; // Total pixels to benchmark / 1280.
87 int disable_cpu_flags_; // Default 0. Use -1 for benchmarking. 147 int disable_cpu_flags_; // Default 0. Use -1 for benchmarking.
88 }; 148 };
89 149
90 #endif // UNIT_TEST_UNIT_TEST_H_ NOLINT 150 #endif // UNIT_TEST_UNIT_TEST_H_ NOLINT
OLDNEW
« no previous file with comments | « unit_test/scale_test.cc ('k') | unit_test/unit_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698