aboutsummaryrefslogtreecommitdiff
path: root/old-tests/test/generated/driver.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'old-tests/test/generated/driver.cxx')
-rw-r--r--old-tests/test/generated/driver.cxx24
1 files changed, 24 insertions, 0 deletions
diff --git a/old-tests/test/generated/driver.cxx b/old-tests/test/generated/driver.cxx
new file mode 100644
index 0000000..008dbf7
--- /dev/null
+++ b/old-tests/test/generated/driver.cxx
@@ -0,0 +1,24 @@
+#include <iostream>
+#include <fstream>
+
+using namespace std;
+
+int
+main (int argc, char* argv[])
+{
+ if (argc != 2)
+ {
+ cerr << "usage: " << argv[0] << " <file>" << endl;
+ return 1;
+ }
+
+ ifstream ifs (argv[1], ifstream::in | ifstream::binary | ifstream::ate);
+
+ if (!ifs.is_open ())
+ cerr << "unable to open " << argv[1] << endl;
+
+ if (ifs.tellg () == 0)
+ cerr << argv[1] << " is empty" << endl;
+
+ return 0;
+}