Lines Matching full:fixture
17 zassert_ok(sensor_sample_fetch_chan(fixture->dev, SENSOR_CHAN_VOLTAGE)); \
18 zassert_ok(sensor_channel_get(fixture->dev, SENSOR_CHAN_VOLTAGE, sensor_val)); \
31 zassert_ok(sensor_sample_fetch_chan(fixture->dev, SENSOR_CHAN_CURRENT)); \
32 zassert_ok(sensor_channel_get(fixture->dev, SENSOR_CHAN_CURRENT, sensor_val)); \
47 zassert_ok(sensor_sample_fetch_chan(fixture->dev, temperature_type)); \
48 zassert_ok(sensor_channel_get(fixture->dev, temperature_type, sensor_val)); \
63 static struct adltc2990_0_0_fixture fixture = { in adltc2990_0_0_setup() local
68 zassert_not_null(fixture.dev); in adltc2990_0_0_setup()
69 zassert_not_null(fixture.target); in adltc2990_0_0_setup()
70 return &fixture; in adltc2990_0_0_setup()
75 struct adltc2990_0_0_fixture *fixture = f; in adltc2990_0_0_before() local
77 adltc2990_emul_reset(fixture->target); in adltc2990_0_0_before()
86 zassert_equal(-ENOTSUP, sensor_sample_fetch_chan(fixture->dev, SENSOR_CHAN_MAGN_X)); in ZTEST_F()
87 zassert_equal(-ENOTSUP, sensor_channel_get(fixture->dev, SENSOR_CHAN_MAGN_Z, value)); in ZTEST_F()
88 zassert_equal(-EINVAL, sensor_channel_get(fixture->dev, SENSOR_CHAN_CURRENT, value)); in ZTEST_F()
89 zassert_equal(-EINVAL, sensor_channel_get(fixture->dev, SENSOR_CHAN_AMBIENT_TEMP, value)); in ZTEST_F()
101 static struct adltc2990_4_3_fixture fixture = { in adltc2990_4_3_setup() local
106 zassert_not_null(fixture.dev); in adltc2990_4_3_setup()
107 zassert_not_null(fixture.target); in adltc2990_4_3_setup()
108 return &fixture; in adltc2990_4_3_setup()
113 struct adltc2990_4_3_fixture *fixture = f; in adltc2990_4_3_before() local
115 adltc2990_emul_reset(fixture->target); in adltc2990_4_3_before()
124 zassert_equal(0, sensor_sample_fetch_chan(fixture->dev, SENSOR_CHAN_VOLTAGE)); in ZTEST_F()
125 zassert_equal(0, sensor_channel_get(fixture->dev, SENSOR_CHAN_VOLTAGE, value)); in ZTEST_F()
126 zassert_equal(0, sensor_sample_fetch_chan(fixture->dev, SENSOR_CHAN_AMBIENT_TEMP)); in ZTEST_F()
127 zassert_equal(0, sensor_channel_get(fixture->dev, SENSOR_CHAN_AMBIENT_TEMP, value)); in ZTEST_F()
128 zassert_equal(0, sensor_sample_fetch_chan(fixture->dev, SENSOR_CHAN_CURRENT)); in ZTEST_F()
129 zassert_equal(0, sensor_channel_get(fixture->dev, SENSOR_CHAN_CURRENT, value)); in ZTEST_F()
141 static struct adltc2990_1_3_fixture fixture = { in adltc2990_1_3_setup() local
146 zassert_not_null(fixture.dev); in adltc2990_1_3_setup()
147 zassert_not_null(fixture.target); in adltc2990_1_3_setup()
148 return &fixture; in adltc2990_1_3_setup()
153 struct adltc2990_1_3_fixture *fixture = f; in adltc2990_1_3_before() local
155 adltc2990_emul_reset(fixture->target); in adltc2990_1_3_before()
165 adltc2990_emul_set_reg(fixture->target, ADLTC2990_REG_INTERNAL_TEMP_MSB, &msb); in ZTEST_F()
166 adltc2990_emul_set_reg(fixture->target, ADLTC2990_REG_INTERNAL_TEMP_LSB, &lsb); in ZTEST_F()
176 adltc2990_emul_set_reg(fixture->target, ADLTC2990_REG_INTERNAL_TEMP_MSB, &msb); in ZTEST_F()
177 adltc2990_emul_set_reg(fixture->target, ADLTC2990_REG_INTERNAL_TEMP_LSB, &lsb); in ZTEST_F()
188 adltc2990_emul_set_reg(fixture->target, ADLTC2990_REG_V3_MSB, &msb); in ZTEST_F()
189 adltc2990_emul_set_reg(fixture->target, ADLTC2990_REG_V3_LSB, &lsb); in ZTEST_F()
199 adltc2990_emul_set_reg(fixture->target, ADLTC2990_REG_V1_MSB, &msb_reg_value); in ZTEST_F()
200 adltc2990_emul_set_reg(fixture->target, ADLTC2990_REG_V1_LSB, &lsb_reg_value); in ZTEST_F()
203 const struct adltc2990_config *dev_config = fixture->target->dev->config; in ZTEST_F()
209 adltc2990_emul_set_reg(fixture->target, ADLTC2990_REG_V1_MSB, &msb_reg_value); in ZTEST_F()
210 adltc2990_emul_set_reg(fixture->target, ADLTC2990_REG_V1_LSB, &lsb_reg_value); in ZTEST_F()
218 adltc2990_emul_set_reg(fixture->target, ADLTC2990_REG_V1_MSB, &msb); in ZTEST_F()
219 adltc2990_emul_set_reg(fixture->target, ADLTC2990_REG_V1_LSB, &lsb); in ZTEST_F()
223 adltc2990_emul_set_reg(fixture->target, ADLTC2990_REG_VCC_MSB, &msb); in ZTEST_F()
224 adltc2990_emul_set_reg(fixture->target, ADLTC2990_REG_VCC_LSB, &lsb); in ZTEST_F()
226 zassert_ok(sensor_sample_fetch_chan(fixture->dev, SENSOR_CHAN_VOLTAGE)); in ZTEST_F()
230 zassert_ok(sensor_channel_get(fixture->dev, SENSOR_CHAN_VOLTAGE, voltage_values)); in ZTEST_F()
251 static struct adltc2990_5_3_fixture fixture = { in adltc2990_5_3_setup() local
256 zassert_not_null(fixture.dev); in adltc2990_5_3_setup()
257 zassert_not_null(fixture.target); in adltc2990_5_3_setup()
258 return &fixture; in adltc2990_5_3_setup()
263 struct adltc2990_5_3_fixture *fixture = f; in adltc2990_5_3_before() local
265 adltc2990_emul_reset(fixture->target); in adltc2990_5_3_before()
275 adltc2990_emul_set_reg(fixture->target, ADLTC2990_REG_V1_MSB, &msb); in ZTEST_F()
276 adltc2990_emul_set_reg(fixture->target, ADLTC2990_REG_V1_LSB, &lsb); in ZTEST_F()
285 adltc2990_emul_set_reg(fixture->target, ADLTC2990_REG_V3_MSB, &msb); in ZTEST_F()
286 adltc2990_emul_set_reg(fixture->target, ADLTC2990_REG_V3_LSB, &lsb); in ZTEST_F()
295 adltc2990_emul_set_reg(fixture->target, ADLTC2990_REG_INTERNAL_TEMP_MSB, &msb); in ZTEST_F()
296 adltc2990_emul_set_reg(fixture->target, ADLTC2990_REG_INTERNAL_TEMP_LSB, &lsb); in ZTEST_F()
312 static struct adltc2990_6_3_fixture fixture = { in adltc2990_6_3_setup() local
317 zassert_not_null(fixture.dev); in adltc2990_6_3_setup()
318 zassert_not_null(fixture.target); in adltc2990_6_3_setup()
319 return &fixture; in adltc2990_6_3_setup()
324 struct adltc2990_6_3_fixture *fixture = f; in adltc2990_6_3_before() local
326 adltc2990_emul_reset(fixture->target); in adltc2990_6_3_before()
336 adltc2990_emul_set_reg(fixture->target, ADLTC2990_REG_V1_MSB, &msb_reg_value); in ZTEST_F()
337 adltc2990_emul_set_reg(fixture->target, ADLTC2990_REG_V1_LSB, &lsb_reg_value); in ZTEST_F()
340 const struct adltc2990_config *dev_config = fixture->target->dev->config; in ZTEST_F()
346 adltc2990_emul_set_reg(fixture->target, ADLTC2990_REG_V3_MSB, &msb_reg_value); in ZTEST_F()
347 adltc2990_emul_set_reg(fixture->target, ADLTC2990_REG_V3_LSB, &lsb_reg_value); in ZTEST_F()
359 static struct adltc2990_7_3_fixture fixture = { in adltc2990_7_3_setup() local
364 zassert_not_null(fixture.dev); in adltc2990_7_3_setup()
365 zassert_not_null(fixture.target); in adltc2990_7_3_setup()
366 return &fixture; in adltc2990_7_3_setup()
371 struct adltc2990_7_3_fixture *fixture = f; in adltc2990_7_3_before() local
373 adltc2990_emul_reset(fixture->target); in adltc2990_7_3_before()
380 zassert_equal(-EINVAL, sensor_sample_fetch_chan(fixture->dev, SENSOR_CHAN_AMBIENT_TEMP)); in ZTEST_F()
381 zassert_equal(-EINVAL, sensor_sample_fetch_chan(fixture->dev, SENSOR_CHAN_CURRENT)); in ZTEST_F()
388 adltc2990_emul_set_reg(fixture->target, ADLTC2990_REG_STATUS, &is_busy); in ZTEST_F()
389 zassert_equal(-EBUSY, sensor_sample_fetch_chan(fixture->dev, SENSOR_CHAN_ALL)); in ZTEST_F()
391 adltc2990_emul_set_reg(fixture->target, ADLTC2990_REG_STATUS, &is_busy); in ZTEST_F()
392 zassert_equal(0, sensor_sample_fetch_chan(fixture->dev, SENSOR_CHAN_ALL)); in ZTEST_F()
401 adltc2990_emul_set_reg(fixture->target, ADLTC2990_REG_INTERNAL_TEMP_MSB, &msb); in ZTEST_F()
402 adltc2990_emul_set_reg(fixture->target, ADLTC2990_REG_INTERNAL_TEMP_LSB, &lsb); in ZTEST_F()
407 sensor_channel_get(fixture->dev, SENSOR_CHAN_ALL, die_temp_value_null)); in ZTEST_F()
419 adltc2990_emul_set_reg(fixture->target, ADLTC2990_REG_V1_MSB, &msb_reg_value); in ZTEST_F()
420 adltc2990_emul_set_reg(fixture->target, ADLTC2990_REG_V1_LSB, &lsb_reg_value); in ZTEST_F()
425 adltc2990_emul_set_reg(fixture->target, ADLTC2990_REG_V2_MSB, &msb_reg_value); in ZTEST_F()
426 adltc2990_emul_set_reg(fixture->target, ADLTC2990_REG_V2_LSB, &lsb_reg_value); in ZTEST_F()
431 adltc2990_emul_set_reg(fixture->target, ADLTC2990_REG_V3_MSB, &msb_reg_value); in ZTEST_F()
432 adltc2990_emul_set_reg(fixture->target, ADLTC2990_REG_V3_LSB, &lsb_reg_value); in ZTEST_F()
437 adltc2990_emul_set_reg(fixture->target, ADLTC2990_REG_V4_MSB, &msb_reg_value); in ZTEST_F()
438 adltc2990_emul_set_reg(fixture->target, ADLTC2990_REG_V4_LSB, &lsb_reg_value); in ZTEST_F()
443 adltc2990_emul_set_reg(fixture->target, ADLTC2990_REG_VCC_MSB, &msb_reg_value); in ZTEST_F()
444 adltc2990_emul_set_reg(fixture->target, ADLTC2990_REG_VCC_LSB, &lsb_reg_value); in ZTEST_F()
448 const struct adltc2990_config *dev_config = fixture->dev->config; in ZTEST_F()
482 static struct adltc2990_incorrect_fixture fixture = { in adltc2990_incorrect_setup() local
487 zassert_not_null(fixture.dev); in adltc2990_incorrect_setup()
488 zassert_not_null(fixture.target); in adltc2990_incorrect_setup()
489 return &fixture; in adltc2990_incorrect_setup()
494 struct adltc2990_incorrect_fixture *fixture = f; in adltc2990_incorrect_before() local
496 adltc2990_emul_reset(fixture->target); in adltc2990_incorrect_before()
506 zassert_equal(-EINVAL, sensor_channel_get(fixture->dev, SENSOR_CHAN_CURRENT, current)); in ZTEST_F()