mirror of
https://github.com/linux-msm/qmic.git
synced 2026-02-25 13:11:34 -08:00
The commit 61f6fe9d1c ("parser: be more restrictive when parsing numbers")
introduced a bug where having a single '0' would cause a parser error
due to the base handling logic swallowing the ;. Fix this
and add a test to check for it.
23 lines
376 B
Plaintext
23 lines
376 B
Plaintext
package test;
|
|
|
|
const TEST_SINGLE_DIGIT_ZERO = 0;
|
|
const TEST_SINGLE_DIGIT_N = 5;
|
|
|
|
struct qmi_result {
|
|
u16 result;
|
|
u16 error;
|
|
};
|
|
|
|
request test_request {
|
|
required u8 test_single_digit_bracket(5) = 0;
|
|
required u8 zero_brackets(0) = 1;
|
|
} = 0x23;
|
|
|
|
response test_response {
|
|
required qmi_result r = 20;
|
|
} = 043;
|
|
|
|
indication test_indication {
|
|
optional u64 value = 0x99;
|
|
} = 0x7;
|