File tree 2 files changed +27
-0
lines changed
2 files changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
41
41
- Properly report error in building shared library
42
42
- A missing ` examples ` directory no longer causes a crash in ` cpp_library.rb `
43
43
- Referring to an undefined platform no longer causes a crash; it's now a helpful error message
44
+ - A copy/paste error that prevented compiler warning flags from being supplied has been fixed, via jgfoster
44
45
45
46
### Security
46
47
Original file line number Diff line number Diff line change @@ -75,6 +75,32 @@ def verified_install(backend, path)
75
75
RSpec . describe ArduinoCI ::CppLibrary do
76
76
next if skip_ruby_tests
77
77
78
+ context "compiler flags" do
79
+ config = ArduinoCI ::CIConfig . new
80
+ config . load_yaml ( File . join ( File . dirname ( __FILE__ ) , "yaml" , "o1.yaml" ) )
81
+ bogo_config = config . gcc_config ( "bogo" )
82
+ fld = FakeLibDir . new
83
+ backend = fld . backend
84
+ cpp_lib_path = sampleproj_path + "DoSomething"
85
+ cpp_library = verified_install ( backend , cpp_lib_path )
86
+
87
+ # the keys are the methods of cpp_library to call
88
+ # the results are what we expect to see based on the config we loaded
89
+ methods_and_results = {
90
+ feature_args : [ "-fa" , "-fb" ] ,
91
+ warning_args : [ "-We" , "-Wf" ] ,
92
+ define_args : [ "-Dc" , "-Dd" ] ,
93
+ flag_args : [ "g" , "h" ]
94
+ }
95
+
96
+ methods_and_results . each do |m , expected |
97
+ it "Creates #{ m } from config" do
98
+ expect ( expected ) . to eq ( cpp_library . send ( m , bogo_config ) )
99
+ end
100
+ end
101
+
102
+ end
103
+
78
104
context "arduino-library-specification detection" do
79
105
80
106
answers = {
You can’t perform that action at this time.
0 commit comments