mirror of
https://github.com/revng/revng
synced 2026-06-21 14:07:57 +00:00
f67f7aef77
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.
24 lines
430 B
C
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;
|
|
}
|