blob: a8e5cabac2ef16977af240b9ce41e8fdadc1f46a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
// file : tests/test/simple/generated/driver.cxx -*- C++ -*-
// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
#include <string>
#include <fstream>
#include <iostream>
using namespace std;
int
main (int argc, char* argv[])
{
int r (0);
if (argc == 1)
{
cout << "1.2.3" << endl;
}
else
{
ifstream ifs (argv[1]);
if (!ifs.is_open ())
cerr << "unable to open " << argv[1] << endl;
string s;
r = getline (ifs, s) && s == "1.2.3" ? 0 : 1;
}
return r;
}
|