diff options
author | Roland Reichwein <mail@reichwein.it> | 2020-11-21 15:19:45 +0100 |
---|---|---|
committer | Roland Reichwein <mail@reichwein.it> | 2020-11-21 15:19:45 +0100 |
commit | 7edbd99775416a32c88acf8e9379518436905f02 (patch) | |
tree | 6356edb79f846df4aa2f6a8a5ecfeef4e651bcc0 /systemtest | |
parent | 7250bbe5ae2d2ee6b0334bc462aab73f7d8dac0e (diff) |
Support gcc 10 and clang 11
Diffstat (limited to 'systemtest')
-rw-r--r-- | systemtest/config/unix.exp | 6 | ||||
-rw-r--r-- | systemtest/mcc-execute.tests/exitcodes.exp | 3 | ||||
-rw-r--r-- | systemtest/mcc-execute.tests/test-division.cpp | 1 | ||||
-rw-r--r-- | systemtest/mcc-execute.tests/test-modulo.cpp | 1 | ||||
-rw-r--r-- | systemtest/mcc-execute.tests/test-multiplication.cpp | 1 |
5 files changed, 11 insertions, 1 deletions
diff --git a/systemtest/config/unix.exp b/systemtest/config/unix.exp index 2de93b0..1bd9310 100644 --- a/systemtest/config/unix.exp +++ b/systemtest/config/unix.exp @@ -1,9 +1,13 @@ proc runtest_exit_code { test_name command_line exit_code } { + exec ./mcc $command_line.cpp + spawn $command_line expect eof - + + exec rm $command_line + lassign [wait] pid spawnid os_error_flag value if {$os_error_flag == 0} { diff --git a/systemtest/mcc-execute.tests/exitcodes.exp b/systemtest/mcc-execute.tests/exitcodes.exp index 48d19a1..0480be8 100644 --- a/systemtest/mcc-execute.tests/exitcodes.exp +++ b/systemtest/mcc-execute.tests/exitcodes.exp @@ -2,4 +2,7 @@ runtest_exit_code "Return 1" "systemtest/mcc-execute.tests/test-return-1" 1 runtest_exit_code "Addition" "systemtest/mcc-execute.tests/test-addition" 3 +runtest_exit_code "Multiplication" "systemtest/mcc-execute.tests/test-multiplication" 6 +runtest_exit_code "Division" "systemtest/mcc-execute.tests/test-division" 2 +runtest_exit_code "Modulo" "systemtest/mcc-execute.tests/test-modulo" 1 diff --git a/systemtest/mcc-execute.tests/test-division.cpp b/systemtest/mcc-execute.tests/test-division.cpp new file mode 100644 index 0000000..21fc59f --- /dev/null +++ b/systemtest/mcc-execute.tests/test-division.cpp @@ -0,0 +1 @@ +int main() { return 6 / 3; } diff --git a/systemtest/mcc-execute.tests/test-modulo.cpp b/systemtest/mcc-execute.tests/test-modulo.cpp new file mode 100644 index 0000000..c20fe78 --- /dev/null +++ b/systemtest/mcc-execute.tests/test-modulo.cpp @@ -0,0 +1 @@ +int main() { return 7 % 3; } diff --git a/systemtest/mcc-execute.tests/test-multiplication.cpp b/systemtest/mcc-execute.tests/test-multiplication.cpp new file mode 100644 index 0000000..d510f96 --- /dev/null +++ b/systemtest/mcc-execute.tests/test-multiplication.cpp @@ -0,0 +1 @@ +int main() { return 2 * 3; } |