File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -174,3 +174,25 @@ def test_init_override_app_config(target):
174
174
175
175
mock_json_file_to_dict .assert_any_call (app_config )
176
176
assert config .app_config_data == mock_return
177
+
178
+ @pytest .mark .parametrize ("target" , ["K64F" , "UBLOX_EVK_ODIN_W2" ])
179
+ @pytest .mark .parametrize ("overrides" , [
180
+ {},
181
+ {"restrict_size" : "0x200" },
182
+ {"mbed_app_start" : "0x200" }
183
+ ])
184
+ def test_basic_regions (target , overrides ):
185
+ """
186
+ Test that the region lists are sane with various configurations
187
+ """
188
+ set_targets_json_location ()
189
+ config = Config (target )
190
+ for o , v in overrides .items ():
191
+ setattr (config .target , o , v )
192
+ try :
193
+ if config .has_regions :
194
+ regions = list (config .regions )
195
+ for r in regions :
196
+ assert r .size >= 0
197
+ except ConfigException :
198
+ pass
You can’t perform that action at this time.
0 commit comments