-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
new test for external function calls
- Loading branch information
Abdalla
committed
Jun 18, 2024
1 parent
b0cbb98
commit fc34447
Showing
2 changed files
with
54 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
gametime-project: | ||
file: | ||
location: ext_func.c | ||
analysis-function: test | ||
start-label: null | ||
end-label: null | ||
|
||
|
||
preprocess: | ||
include: null | ||
merge: null | ||
inline: yes | ||
unroll-loops: Yes | ||
|
||
analysis: | ||
maximum-error-scale-factor: 10 | ||
determinant-threshold: 0.001 | ||
max-infeasible-paths: 100 | ||
ilp-solver: glpk | ||
gametime-path: ../../ # default path when tests locally | ||
gametime-file-path: ../../../.. # default path when tests locally |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#include <stdio.h> | ||
#include <stdlib.h> | ||
|
||
int main() { | ||
int x = 5; | ||
int y = 10; | ||
char buffer[20]; | ||
|
||
printf("Before modification:\n"); | ||
printf("x = %d\n", x); | ||
printf("y = %d\n", y); | ||
|
||
// Convert integers to strings | ||
sprintf(buffer, "%d", x); | ||
// Append some digits to the string representation of x | ||
strcat(buffer, "123"); | ||
// Convert back to integer | ||
x = strtol(buffer, NULL, 10); | ||
|
||
// Convert integers to strings | ||
sprintf(buffer, "%d", y); | ||
// Append some digits to the string representation of y | ||
strcat(buffer, "456"); | ||
// Convert back to integer | ||
y = strtol(buffer, NULL, 10); | ||
|
||
printf("After modification:\n"); | ||
printf("x = %d\n", x); | ||
printf("y = %d\n", y); | ||
|
||
return 0; | ||
} |