Files
revng-revng/tests/Runtime/function-call.c
T
Alessandro Di Federico f67f7aef77 Reorganize testsuite
So far the only tests we had were end to end tests to assess the
functionality of simple programs and, in particular, certain helper
functions. In the perspective of being able to test individual features,
and in particular check that we have no regressions in our analyses, we
isolated these end to end tests in the Runtime directory. We kept in the
root test directory the mechanism to compile a binary for a certain
architecture so that all the test types can use it.
2016-12-04 00:28:57 +01:00

24 lines
430 B
C

/*
* This file is distributed under the MIT License. See LICENSE.md for details.
*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
int half(int parameter) {
return parameter / 2;
}
int root(char *buffer, size_t size) {
int result = 412;
result += half(result);
result += 81;
return result;
}
int main(int argc, char *argv[]) {
printf("%d\n", root(argv[1], strlen(argv[1])));
return EXIT_SUCCESS;
}