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

Side by Side Diff: crosstest/test_global_main.cpp

Issue 641193002: Introduce the notion of function addresses in Subzero. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix nit in test. 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 | src/IceConverter.h » ('j') | 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;
27 float ExternName2 = 357.05e-10;
28 char ExternName3[] = {'a', 'b', 'c'};
29 struct {
30 int a;
31 float b;
32 double d;
33 } ExternName4 = {-111, 2.69, 55.19};
34 double ExternName5 = 3.44e26;
35
26 int main(int argc, char **argv) { 36 int main(int argc, char **argv) {
27 size_t TotalTests = 0; 37 size_t TotalTests = 0;
28 size_t Passes = 0; 38 size_t Passes = 0;
29 size_t Failures = 0; 39 size_t Failures = 0;
30 40
31 const uint8_t *SzArray, *LlcArray; 41 const uint8_t *SzArray, *LlcArray;
32 size_t SzArrayLen, LlcArrayLen; 42 size_t SzArrayLen, LlcArrayLen;
33 43
34 size_t NumArrays = getNumArrays(); 44 size_t NumArrays = getNumArrays();
35 for (size_t i = 0; i < NumArrays; ++i) { 45 for (size_t i = 0; i < NumArrays; ++i) {
(...skipping 20 matching lines...) Expand all
56 << ", SzArray[" << i << "] = " << (int)SzArray[i] 66 << ", SzArray[" << i << "] = " << (int)SzArray[i]
57 << "\n"; 67 << "\n";
58 } 68 }
59 } 69 }
60 } 70 }
61 71
62 std::cout << "TotalTests=" << TotalTests << " Passes=" << Passes 72 std::cout << "TotalTests=" << TotalTests << " Passes=" << Passes
63 << " Failures=" << Failures << "\n"; 73 << " Failures=" << Failures << "\n";
64 return Failures; 74 return Failures;
65 } 75 }
OLDNEW
« no previous file with comments | « no previous file | src/IceConverter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698