mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-29 05:40:25 -04:00
conf: improve simple integer math expressions - brackets
Add brackets to the simple math expressions like: $[($a+($val+100))/2] Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
7b6da9ee6d
commit
9b53b1f0fb
2 changed files with 19 additions and 9 deletions
|
|
@ -574,8 +574,10 @@ static void test_evaluate_string(void)
|
|||
{ .expr = "$[0xff&0xfc]", .result = 0xfc },
|
||||
{ .expr = "$[4294967296+10]", .result = 4294967306LL },
|
||||
{ .expr = "$[$var10+1]", .result = 11 },
|
||||
{ .expr = "$[1+1+1]", .result = 11 },
|
||||
{ .expr = "$[$var10 + $var50]", .result = 60 },
|
||||
{ .expr = "$[ $var10 + $[ $var50 + 10 ] ]", .result = 70 },
|
||||
{ .expr = "$[ ( $var10 + ( $var50 + 112 ) ) + 5 ]", .result = 177 },
|
||||
{ .expr = NULL, .result = 0 },
|
||||
};
|
||||
snd_config_t *dst;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue