fix for semaphore unittest

This commit is contained in:
Robin Müller 2022-11-28 08:37:42 +01:00
parent d6ee2ed400
commit b93fc679d7
No known key found for this signature in database
GPG Key ID: 71B58F8A3CDFA9AC

View File

@ -19,7 +19,7 @@ TEST_CASE("Binary Semaphore Test" , "[BinSemaphore]") {
REQUIRE(binSemaph->release() == REQUIRE(binSemaph->release() ==
static_cast<int>(SemaphoreIF::SEMAPHORE_NOT_OWNED)); static_cast<int>(SemaphoreIF::SEMAPHORE_NOT_OWNED));
REQUIRE(binSemaph->acquire(SemaphoreIF::POLLING) == REQUIRE(binSemaph->acquire(SemaphoreIF::POLLING) ==
result::OK); returnvalue::OK);
{ {
// not precise enough on linux.. should use clock instead.. // not precise enough on linux.. should use clock instead..
//Stopwatch stopwatch(false); //Stopwatch stopwatch(false);
@ -29,7 +29,7 @@ TEST_CASE("Binary Semaphore Test" , "[BinSemaphore]") {
//CHECK(time == 5); //CHECK(time == 5);
} }
REQUIRE(binSemaph->getSemaphoreCounter() == 0); REQUIRE(binSemaph->getSemaphoreCounter() == 0);
REQUIRE(binSemaph->release() == result::OK); REQUIRE(binSemaph->release() == returnvalue::OK);
} }
SemaphoreFactory::instance()->deleteSemaphore(binSemaph); SemaphoreFactory::instance()->deleteSemaphore(binSemaph);
// perform tear-down here // perform tear-down here