Files
qmic/tests/single_digit_decimal.qmi
Caleb Connolly 4574736afc parser: handle decimal '0' when parsing numbers
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.
2022-07-18 15:48:00 -05:00

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;