tests: Add 70-function-modulo.c.
* lib/tests/scaffold/70-function-modulo.c: New file. * build-aux/check-mescc.sh (tcc_tests): Add it.
This commit is contained in:
parent
4b194d7bc7
commit
b531c73590
|
@ -193,6 +193,7 @@ lib/tests/scaffold/70-struct-short-enum-init.c
|
|||
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/setjmp/80-setjmp.c
|
||||
lib/tests/stdio/80-sscanf.c
|
||||
lib/tests/stdlib/80-qsort.c
|
||||
|
|
34
lib/tests/scaffold/70-function-modulo.c
Normal file
34
lib/tests/scaffold/70-function-modulo.c
Normal file
|
@ -0,0 +1,34 @@
|
|||
/* -*-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)
|
||||
{
|
||||
return i;
|
||||
}
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
int i = test (5) % 3;
|
||||
if (i != 2)
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
Loading…
Reference in a new issue