test bugfix: check invalid function results in SPI tests 61/236961/2
authorWiktor Gerstenstein <w.gerstenste@partner.samsung.com>
Tue, 23 Jun 2020 16:32:50 +0000 (18:32 +0200)
committerWiktor Gerstenstein <w.gerstenste@partner.samsung.com>
Thu, 25 Jun 2020 12:17:36 +0000 (14:17 +0200)
Change-Id: I5b254a97e0df869666420c031fe10e122961d79c

test/src/test_peripheral_spi.c

index 1969138..36f607e 100644 (file)
@@ -431,7 +431,7 @@ int test_peripheral_io_spi_peripheral_spi_set_bit_order_p2(void)
                        return ret;
 
                ret = peripheral_spi_set_bit_order(spi_h, PERIPHERAL_SPI_BIT_ORDER_LSB);
-               if (ret != PERIPHERAL_ERROR_IO_ERROR) {
+               if (ret != PERIPHERAL_ERROR_NONE) {
                        peripheral_spi_close(spi_h);
                        return ret;
                }
@@ -587,7 +587,7 @@ int test_peripheral_io_spi_peripheral_spi_set_bits_per_word_n2(void)
                        return ret;
 
                ret = peripheral_spi_set_bits_per_word(spi_h, SPI_BITS_PER_WORD_INVALID);
-               if (ret != PERIPHERAL_ERROR_IO_ERROR) {
+               if (ret != PERIPHERAL_ERROR_INVALID_PARAMETER) {
                        peripheral_spi_close(spi_h);
                        return ret;
                }