summaryrefslogtreecommitdiff
path: root/tests/exec
diff options
context:
space:
mode:
authorAlex AUVOLAT <alex.auvolat@ens.fr>2013-12-27 12:23:56 +0100
committerAlex AUVOLAT <alex.auvolat@ens.fr>2013-12-27 12:23:56 +0100
commitbe04d1bbd98793d1a8ca5429c43f1f1d8182a0a2 (patch)
tree1a93cd049e70c84ada6ff6048b986dca504e9a44 /tests/exec
parent0ea39f0178ea94cdb015aef257228f201f9f96b9 (diff)
downloadLPC-Projet-be04d1bbd98793d1a8ca5429c43f1f1d8182a0a2.tar.gz
LPC-Projet-be04d1bbd98793d1a8ca5429c43f1f1d8182a0a2.zip
Added a test ; bug corrections ; more optimizations.
Diffstat (limited to 'tests/exec')
-rw-r--r--tests/exec/args1.cpp13
-rw-r--r--tests/exec/args1.out2
2 files changed, 15 insertions, 0 deletions
diff --git a/tests/exec/args1.cpp b/tests/exec/args1.cpp
new file mode 100644
index 0000000..52edd82
--- /dev/null
+++ b/tests/exec/args1.cpp
@@ -0,0 +1,13 @@
+#include <iostream>
+
+int f(int a, int b, int c, int d, int e, int f) {
+ std::cout << "a = " << a << ", b = " << b <<
+ ", c = " << c << ", d = " << d << ", e = " <<
+ e << ", f = " << f << "\n";
+ return a + b + c + d + e + f;
+}
+
+int main() {
+ int x = f(1, 2, 3, 4, 5, 6);
+ std::cout << "x = " << x << "\n";
+}
diff --git a/tests/exec/args1.out b/tests/exec/args1.out
new file mode 100644
index 0000000..34f8b2d
--- /dev/null
+++ b/tests/exec/args1.out
@@ -0,0 +1,2 @@
+a = 1, b = 2, c = 3, d = 4, e = 5, f = 6
+x = 21