tests: Add 70-or-argument.c.

* lib/tests/scaffold/70-or-argument.c: New file.
* build-aux/check-mescc.sh (tcc_tests): Add it.
This commit is contained in:
Jan (janneke) Nieuwenhuizen 2020-12-01 11:36:23 +01:00
parent b531c73590
commit 9711ed70ec
No known key found for this signature in database
GPG key ID: F3C1A0D9C1D65273
2 changed files with 38 additions and 0 deletions

View file

@ -194,6 +194,7 @@ lib/tests/scaffold/70-struct-post.c
lib/tests/scaffold/70-extern.c
lib/tests/scaffold/70-ternary-arithmetic-argument.c
lib/tests/scaffold/70-function-modulo.c
lib/tests/scaffold/70-or-argument.c
lib/tests/setjmp/80-setjmp.c
lib/tests/stdio/80-sscanf.c
lib/tests/stdlib/80-qsort.c

View file

@ -0,0 +1,37 @@
/* -*-comment-start: "//";comment-end:""-*-
* GNU Mes --- Maxwell Equations of Software
* Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
*
* This file is part of GNU Mes.
*
* GNU Mes is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or (at
* your option) any later version.
*
* GNU Mes is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/
int
test (int i, int j, int k)
{
return i + j + k;
}
int
main ()
{
int i = 1;
int j = 2;
int k = 4;
int r = test (1, i, j | k);
if (r != 8)
return 1;
return 0;
}