blob: 3274cf8ac0f1e91b3c190f8ec402f8e75b01510e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#include <fstream>
#include <iostream>
#include <string>
extern int a, b;
// A very roundabout hello world.
int main(int argc, char* argv[]) {
std::string runfiles(argv[0]);
runfiles.append(".runfiles");
std::string hello(runfiles + "/rules_pkg/tests/testdata/hello.txt");
std::fstream fs;
fs.open(hello, std::iostream::in);
char tmp[1000];
fs.read(tmp, sizeof(tmp));
fs.close();
std::cout << tmp;
return (a + b > 0) ? 0 : 1;
}
|