Skip to content

Commit

Permalink
gh-685: Replace constexpr with define
Browse files Browse the repository at this point in the history
  • Loading branch information
pnoltes committed Jun 2, 2024
1 parent 5b4cd3a commit fe5aa59
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions libs/framework/gtest/src/CelixLauncherTestSuite.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@
#include "celix_stdlib_cleanup.h"
#include "celix_utils.h"

#define LAUNCH_WAIT_TIMEOUT 100

class CelixLauncherTestSuite : public ::testing::Test {
public:
static constexpr int LAUNCH_WAIT_TIMEOUT{100};

static std::future<void> launchInThread(const std::vector<std::string>& args, celix_properties_t* props, int expectedRc) {
std::string propsStr{};
if (props) {
Expand Down Expand Up @@ -208,7 +208,7 @@ TEST_F(CelixLauncherTestSuite, StopLauncherWithSignalTest) {
EXPECT_EQ(status, std::future_status::ready);
}

TEST_F(CelixLauncherTestSuite, DoubleStartAndStopLauncher) {
TEST_F(CelixLauncherTestSuite, DoubleStartAndStopLauncherTest) {
// When launching the framework
auto future = launchInThread({"programName"}, nullptr, 0);

Expand All @@ -235,3 +235,11 @@ TEST_F(CelixLauncherTestSuite, DoubleStartAndStopLauncher) {

// Then nothing happens
}

TEST_F(CelixLauncherTestSuite, StartWithInvalidEmbeddedPropertiesTest) {
//When launching the framework with an invalid embedded properties
auto rc = celix_launcher_launchAndWait(0, nullptr, "invalid props");

//Then the launch will exit with a return code of 1
EXPECT_EQ(1, rc);
}

0 comments on commit fe5aa59

Please sign in to comment.