]> git.feebdaed.xyz Git - 0xmirror/WiringPi.git/commitdiff
#243 unit test
authormstroh76 <m.stroh76@gmail.com>
Sat, 18 May 2024 10:56:55 +0000 (12:56 +0200)
committermstroh76 <m.stroh76@gmail.com>
Sat, 18 May 2024 10:56:55 +0000 (12:56 +0200)
wiringPi/test/Makefile
wiringPi/test/wiringpi_xotest_test1_spi.c

index 9a95b7302c84d2614b1488b47bab831e14a70949..e448f16e4424c6484da5b3ebcab1d31a54581b09 100644 (file)
@@ -50,7 +50,7 @@ test:
 
 xotest:
        @error_state=false ; \
-       for t in $(xotests)  ; do \
+       for t in $(tests) $(xotests)  ; do \
                echo === unit test: $${t} === ; \
                time ./$${t} ; \
                if [ $$? -ne 0 ]; then \
index a04cfe9a5bfb019acce04ca17a1d919ad8c13f98..1acd6945dccb96cc80a4134a12cc39f1bf27853a 100644 (file)
@@ -104,14 +104,14 @@ int main(int argc, char *argv []){
     checkVoltage(0.1f, "Analog value 1xLow");
 
     digitalWriteEx(21, GPIOIn, HIGH);
-    checkVoltage(3.0f, "Analog value 1xHigh");
+    checkVoltage(3.1f, "Analog value 1xHigh");
 
     pinMode(22, OUTPUT);
     digitalWriteEx(22, -1, LOW);
     checkVoltage(1.55f, "Analog value Half (1H/1L)");
 
     digitalWriteEx(22, GPIOIn, HIGH);
-    checkVoltage(3.1f, "Analog value 2xHigh");
+    checkVoltage(3.2f, "Analog value 2xHigh");
 
     pinMode(24, OUTPUT);
     digitalWriteEx(24, GPIOIn, HIGH);
@@ -172,7 +172,7 @@ int main(int argc, char *argv []){
     }
     ret = wiringPiSPIxGetFd(0, spiChannel);
     CheckSame("Fd after close", ret, -1);
-    
+
     return UnitTestState();
 }