File tree 2 files changed +45
-0
lines changed
regression/test-c-gen/struct3 2 files changed +45
-0
lines changed Original file line number Diff line number Diff line change
1
+ #include <stdbool.h>
2
+
3
+ typedef struct
4
+ {
5
+ bool b ;
6
+ int x ;
7
+ } example_s ;
8
+
9
+ void fun (example_s struct_param )
10
+ {
11
+ if (!struct_param .b )
12
+ {
13
+ }
14
+ if (struct_param .x > 0 )
15
+ {
16
+ struct_param .b = false;
17
+ }
18
+
19
+ if (struct_param .b )
20
+ {
21
+ }
22
+ }
Original file line number Diff line number Diff line change
1
+ CORE
2
+ main.c
3
+ --function fun --cover branch --gen-c-test-case
4
+ ^EXIT=0$
5
+ ^SIGNAL=0$
6
+ ^#include <assert\.h>$
7
+ ^#include <stdio\.h>$
8
+ ^#include <stdlib\.h>$
9
+
10
+ ^#include "main\.c"$
11
+ ^int test_main(int argc, char\* argv)$
12
+ ^\{$
13
+ ^ example_s arg_fun_struct_param = { \.b=1, \.x=-2147483648 };$
14
+ ^ example_s arg_fun_struct_param = { \.b=0, \.x=-2147483648 };$
15
+ ^ example_s arg_fun_struct_param = { \.b=0, \.x=1 };$
16
+ ^ fun(arg_fun_struct_param);$
17
+ ^ exit(0);$
18
+ ^ return 0;$
19
+ ^\}$
20
+
21
+
22
+ --
23
+ ^warning: ignoring
You can’t perform that action at this time.
0 commit comments