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

Side by Side Diff: crosstest/test_global_main.cpp

Issue 651673003: Fix cross test test_global. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 6 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 | « no previous file | 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 //===- subzero/crosstest/test_global_main.cpp - Driver for tests ----------===// 1 //===- subzero/crosstest/test_global_main.cpp - Driver for tests ----------===//
2 // 2 //
3 // The Subzero Code Generator 3 // The Subzero Code Generator
4 // 4 //
5 // This file is distributed under the University of Illinois Open Source 5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details. 6 // License. See LICENSE.TXT for details.
7 // 7 //
8 //===----------------------------------------------------------------------===// 8 //===----------------------------------------------------------------------===//
9 // 9 //
10 // Driver for crosstesting global variable access operations. 10 // Driver for crosstesting global variable access operations.
11 // 11 //
12 //===----------------------------------------------------------------------===// 12 //===----------------------------------------------------------------------===//
13 13
14 /* crosstest.py --test=test_global.cpp \ 14 /* crosstest.py --test=test_global.cpp \
15 --driver=test_global_main.cpp --prefix=Subzero_ --output=test_global */ 15 --driver=test_global_main.cpp --prefix=Subzero_ --output=test_global */
16 16
17 #include <stdint.h> 17 #include <stdint.h>
18 #include <cstdlib> 18 #include <cstdlib>
19 #include <iostream> 19 #include <iostream>
20 20
21 #include "test_global.h" 21 #include "test_global.h"
22 namespace Subzero_ { 22 namespace Subzero_ {
23 #include "test_global.h" 23 #include "test_global.h"
24 } 24 }
25 25
26 int ExternName1 = 36363; 26 int ExternName1 = 36363;
27 float ExternName2 = 357.05e-10; 27 float ExternName2 = 357.05e-10;
28 char ExternName3[] = {'a', 'b', 'c'}; 28 char ExternName3[] = {'a', 'b', 'c'};
29 struct { 29 struct data {
Jim Stichnoth 2014/10/20 21:23:25 struct Data
Karl 2014/10/20 21:27:03 Done.
30 int a; 30 int a;
31 float b; 31 float b;
32 double d; 32 double d;
33 } ExternName4 = {-111, 2.69, 55.19}; 33 };
34
35 struct data SimpleData = {-111, 2.69, 55.19};
36
37 struct data *ExternName4 = &SimpleData;
38
34 double ExternName5 = 3.44e26; 39 double ExternName5 = 3.44e26;
35 40
36 int main(int argc, char **argv) { 41 int main(int argc, char **argv) {
37 size_t TotalTests = 0; 42 size_t TotalTests = 0;
38 size_t Passes = 0; 43 size_t Passes = 0;
39 size_t Failures = 0; 44 size_t Failures = 0;
40 45
41 const uint8_t *SzArray, *LlcArray; 46 const uint8_t *SzArray, *LlcArray;
42 size_t SzArrayLen, LlcArrayLen; 47 size_t SzArrayLen, LlcArrayLen;
43 48
(...skipping 22 matching lines...) Expand all
66 << ", SzArray[" << i << "] = " << (int)SzArray[i] 71 << ", SzArray[" << i << "] = " << (int)SzArray[i]
67 << "\n"; 72 << "\n";
68 } 73 }
69 } 74 }
70 } 75 }
71 76
72 std::cout << "TotalTests=" << TotalTests << " Passes=" << Passes 77 std::cout << "TotalTests=" << TotalTests << " Passes=" << Passes
73 << " Failures=" << Failures << "\n"; 78 << " Failures=" << Failures << "\n";
74 return Failures; 79 return Failures;
75 } 80 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698