bxparks / AUnit

Unit testing framework for Arduino platforms inspired by ArduinoUnit and Google Test. Used with EpoxyDuino for continuous builds.
MIT License
179 stars 16 forks source link

why does assertTrue(true) or assertTrue(1) timeout? #117

Closed reymalahay closed 1 year ago

reymalahay commented 1 year ago

hi there,

Is your feature request related to a problem? Please describe. i have a test that asserts the output of a sut that returns a bool value. more specifically, the happy case output is supposed to be true. when i assertTrue the output, the test times out.

Describe the solution you'd like assertTrue (or assertFalse) should pass when an appropriate value is passed in as an argument.

Describe alternatives you've considered n/a.

Additional context environment: Linux compiler: /usr/bin/g++

sample test:

testing(must_be_true) {

    bool isTrue = true;
    assertTrue(isTrue);
}

Makefile:

APP_NAME := lab1_code_test
ARDUINO_LIBS := AUnit
include ${EPOXY_HOME}/EpoxyDuino.mk

commands:

make clean

make

make run

output log:

./lab1_code_test.out
TestRunner started on 1 test(s).
Test must_be_true timed out.
TestRunner duration: 10.006 seconds.
TestRunner summary: 0 passed, 0 failed, 0 skipped, 1 timed out, out of 1 test(s).
make: *** [/home/reymalahay/dev/EpoxyDuino/EpoxyDuino.mk:243: run] Error 1

please advise.

thanks in advance, rey malahay

bxparks commented 1 year ago

Duplicate of #116