Skip to content

Commit 2404282

Browse files
committed
feat: Reintroduce interactive testing app
1 parent 5bd1e94 commit 2404282

File tree

3 files changed

+719
-1
lines changed

3 files changed

+719
-1
lines changed

src/sdks/core/src/cpp/sdk/cpptest/CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,12 @@ set(TESTAPP TestFireboltCore)
4444

4545
message("Setup ${TESTAPP}")
4646

47-
add_executable(${TESTAPP} CoreSDKTest.cpp Main.cpp)
47+
if (NOT ENABLE_INTERACTIVE_APP)
48+
add_executable(${TESTAPP} CoreSDKTest.cpp Main.cpp)
49+
else ()
50+
add_executable(${TESTAPP} CoreSDKTest.cpp InteractiveApp.cpp)
51+
add_compile_definitions(INTERACTIVE_APP)
52+
endif ()
4853

4954
target_link_libraries(${TESTAPP}
5055
PRIVATE

src/sdks/core/src/cpp/sdk/cpptest/CoreSDKTest.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,15 @@ CoreSDKTest::KeyboardStandardAsyncResponse CoreSDKTest::_keyboardStandardAsyncRe
4646

4747
void CoreSDKTest::ConnectionChanged(const bool connected, const Firebolt::Error error)
4848
{
49+
#ifndef INTERACTIVE_APP
4950
cout << "Change in connection: connected: " << connected << " error: " << static_cast<int>(error) << endl;
5051
_connected = connected;
52+
#else
53+
if (connected) {
54+
cout << "Change in connection: connected: " << connected << " error: " << static_cast<int>(error) << endl;
55+
_connected = connected;
56+
}
57+
#endif
5158
}
5259

5360
void CoreSDKTest::CreateFireboltInstance(const std::string& url)

0 commit comments

Comments
 (0)