File tree 4 files changed +60
-1
lines changed
4 files changed +60
-1
lines changed Original file line number Diff line number Diff line change 2
2
builddir /
3
3
test /sandbox
4
4
.DS_Store
5
+ examples /example_1 /subprojects /unity
5
6
examples /example_1 /test1.exe
6
7
examples /example_1 /test2.exe
7
8
examples /example_2 /all_tests.exe
Original file line number Diff line number Diff line change
1
+ project (' Unity example' , ' c' ,
2
+ license : ' MIT' ,
3
+ default_options : [
4
+ ' c_std=c99' ,
5
+ ' warning_level=3' ,
6
+ ],
7
+ meson_version : ' >= 0.49.0'
8
+ )
9
+
10
+ unity_subproject = subproject (' unity' )
11
+ unity_dependency = unity_subproject.get_variable (' unity_dep' )
12
+ unity_gen_runner = unity_subproject.get_variable (' gen_test_runner' )
13
+
14
+ src1 = files ([
15
+ ' src' / ' ProductionCode.c' ,
16
+ ' test' / ' TestProductionCode.c' ,
17
+ ])
18
+
19
+ src2 = files ([
20
+ ' src' / ' ProductionCode2.c' ,
21
+ ' test' / ' TestProductionCode2.c' ,
22
+ ])
23
+
24
+ inc = include_directories (' src' )
25
+
26
+ test1 = executable (' test1' ,
27
+ sources : [
28
+ src1,
29
+ unity_gen_runner.process(' test' / ' TestProductionCode.c' )
30
+ ],
31
+ include_directories : [ inc ],
32
+ dependencies : [ unity_dependency ],
33
+ )
34
+
35
+ test (' test1' , test1,
36
+ should_fail : true )
37
+
38
+ test2 = executable (' test2' ,
39
+ sources : [
40
+ src2,
41
+ unity_gen_runner.process(' test' / ' TestProductionCode2.c' )
42
+ ],
43
+ include_directories : [ inc ],
44
+ dependencies : [ unity_dependency ],
45
+ )
46
+
47
+ test (' test2' , test2)
48
+
Original file line number Diff line number Diff line change @@ -2,4 +2,11 @@ Example 1
2
2
=========
3
3
4
4
Close to the simplest possible example of Unity, using only basic features.
5
- Run make to build & run the example tests.
5
+
6
+ Build and run with Make
7
+ ---
8
+ Just run `make`.
9
+
10
+ Build and run with Meson
11
+ ---
12
+ Run `meson setup build` to create the build directory, and then `meson test -C build` to build and run the tests.
Original file line number Diff line number Diff line change
1
+ [wrap-git]
2
+ url = https://github.com/ThrowTheSwitch/Unity.git
3
+ revision = head
You can’t perform that action at this time.
0 commit comments