tests: Fix test_analog_unit_to_string unit test.

The loop body was never executed.
This commit is contained in:
Uwe Hermann 2018-06-19 07:03:29 +02:00
parent c5c6fa0f22
commit 72cb20ed07
1 changed files with 2 additions and 2 deletions

View File

@ -197,11 +197,11 @@ START_TEST(test_analog_unit_to_string)
struct sr_analog_encoding encoding;
struct sr_analog_meaning meaning;
struct sr_analog_spec spec;
const char *r[] = {" V RMS"};
const char *r[] = {"V RMS"};
sr_analog_init_(&analog, &encoding, &meaning, &spec, 3);
for (i = -1; i < ARRAY_SIZE(r); i++) {
for (i = 0; i < ARRAY_SIZE(r); i++) {
meaning.unit = SR_UNIT_VOLT;
meaning.mqflags = SR_MQFLAG_RMS;
ret = sr_analog_unit_to_string(&analog, &result);