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

Side by Side Diff: third_party/qcms/src/tests/qcms_test_main.c

Issue 1734423002: [qcms] Fix build issue of qcms_tests for MIPS Linux (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Including third_party/WebKit/LayoutTests/whitespace.txt Created 4 years, 9 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
« third_party/qcms/qcms.gyp ('K') | « third_party/qcms/qcms.gyp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 Chromium LICENSE file. 3 // found in the Chromium LICENSE file.
4 4
5 #include "qcms.h" 5 #include "qcms.h"
6 #include "qcms_test_util.h" 6 #include "qcms_test_util.h"
7 #include "timing.h" 7 #include "timing.h"
8 8
9 #include <math.h> 9 #include <math.h>
10 #include <stdio.h> 10 #include <stdio.h>
11 #include <stdlib.h> 11 #include <stdlib.h>
12 #include <string.h> 12 #include <string.h>
13 13
14 // Manually update the items below to add more tests. 14 // Manually update the items below to add more tests.
15 #ifdef SSE2_ENABLE
radu.velea 2016/03/04 13:33:08 These look like too many ifdef's to me. Maybe we s
lmilko 2016/03/08 13:21:59 Done.
15 extern struct qcms_test_case qcms_test_tetra_clut_rgba_info; 16 extern struct qcms_test_case qcms_test_tetra_clut_rgba_info;
17 #endif
16 extern struct qcms_test_case qcms_test_munsell_info; 18 extern struct qcms_test_case qcms_test_munsell_info;
17 extern struct qcms_test_case qcms_test_internal_srgb_info; 19 extern struct qcms_test_case qcms_test_internal_srgb_info;
18 extern struct qcms_test_case qcms_test_ntsc_gamut_info; 20 extern struct qcms_test_case qcms_test_ntsc_gamut_info;
19 21
22 #ifdef SSE2_ENABLE
20 struct qcms_test_case qcms_test[4]; 23 struct qcms_test_case qcms_test[4];
24 #else
25 struct qcms_test_case qcms_test[3];
26 #endif
27
21 #define TEST_CASES (sizeof(qcms_test) / sizeof(qcms_test[0])) 28 #define TEST_CASES (sizeof(qcms_test) / sizeof(qcms_test[0]))
22 29
23 static void initialize_tests() 30 static void initialize_tests()
24 { 31 {
32 #ifdef SSE2_ENABLE
25 qcms_test[0] = qcms_test_tetra_clut_rgba_info; 33 qcms_test[0] = qcms_test_tetra_clut_rgba_info;
26 qcms_test[1] = qcms_test_munsell_info; 34 qcms_test[1] = qcms_test_munsell_info;
27 qcms_test[2] = qcms_test_internal_srgb_info; 35 qcms_test[2] = qcms_test_internal_srgb_info;
28 qcms_test[3] = qcms_test_ntsc_gamut_info; 36 qcms_test[3] = qcms_test_ntsc_gamut_info;
37 #else
38 qcms_test[0] = qcms_test_munsell_info;
39 qcms_test[1] = qcms_test_internal_srgb_info;
40 qcms_test[2] = qcms_test_ntsc_gamut_info;
41 #endif
29 } 42 }
30 43
31 static void list_tests() 44 static void list_tests()
32 { 45 {
33 int i; 46 int i;
34 printf("Available qcms tests:\n"); 47 printf("Available qcms tests:\n");
35 48
36 for (i = 0; i < TEST_CASES; ++i) { 49 for (i = 0; i < TEST_CASES; ++i) {
37 printf("\t%s\n", qcms_test[i].test_name); 50 printf("\t%s\n", qcms_test[i].test_name);
38 } 51 }
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 143
131 exit_status = 0; 144 exit_status = 0;
132 145
133 for (i = 0; i < TEST_CASES; ++i) { 146 for (i = 0; i < TEST_CASES; ++i) {
134 if (run_all || QCMS_TEST_ENABLED == qcms_test[i].status) 147 if (run_all || QCMS_TEST_ENABLED == qcms_test[i].status)
135 exit_status += qcms_test[i].test_fn(width, height, iterations, in, o ut, force_software); 148 exit_status += qcms_test[i].test_fn(width, height, iterations, in, o ut, force_software);
136 } 149 }
137 150
138 return exit_status; 151 return exit_status;
139 } 152 }
OLDNEW
« third_party/qcms/qcms.gyp ('K') | « third_party/qcms/qcms.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698