Skip to content

Commit

Permalink
Fix the python test
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-projectx committed May 16, 2024
1 parent 624d9c4 commit d9b74a4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
3 changes: 2 additions & 1 deletion examples/config_example1.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@ struct test2 {
a = 1
b = $(a)
c = {{$(a)}}
d = $(c)

proto p {
e = $A
}

d = $(c)
7 changes: 6 additions & 1 deletion python/test_flexi_cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,16 @@ def test_cfg_file(self):
'test2': {'my_key': 'foo',
'n_key': 0x1234,
'var_ref': None},
'q': {'e': 2},
'solo_key': 10.1,
'int_list': [0, 1, 3, -5],
'uint_list': [0x0, 0x1, 0x3, 0x5],
'float_list': [0.0, 1.0, 3.0, -5.0],
'uint64': -5}
'uint64': -5,
'a' : 2,
'b' : 2,
'c' : 2,
'd' : 2,}
expected_cfg['test2']['var_ref'] = expected_cfg['test1']['key3']

cfg = flexi_cfg.parse(cfg_file_path)
Expand Down
4 changes: 2 additions & 2 deletions src/config_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -314,8 +314,8 @@ void Parser::validateAndApplyOverrides(const config::ActionData& state,
"Override invalid: No default found for '{}' in config file. Defined at {}",
override.first, override.second->loc());
}
logger::info("+++ Found default for '{} = {}'. Overriding with {}", override.first,
data.at(parts.back()), override.second);
logger::debug("+++ Found default for '{} = {}'. Overriding with {}", override.first,
data.at(parts.back()), override.second);
// Check that the types match (if possible)
const auto& default_type = data.at(parts.back())->type;
const auto& override_type = override.second->type;
Expand Down

0 comments on commit d9b74a4

Please sign in to comment.