Step 643: sprint 38 integration summary
This commit is contained in:
83
editor/tests/step643_test.cpp
Normal file
83
editor/tests/step643_test.cpp
Normal file
@@ -0,0 +1,83 @@
|
||||
// Step 643: Sprint 38 integration + summary (8 tests)
|
||||
|
||||
#include "Sprint38IntegrationSummary.h"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
static int passed = 0, failed = 0;
|
||||
#define TEST(name) { std::cout << " " << #name << "... "; }
|
||||
#define PASS() { std::cout << "PASS\n"; ++passed; }
|
||||
#define FAIL(msg) { std::cout << "FAIL: " << msg << "\n"; ++failed; }
|
||||
#define CHECK(cond, msg) if (!(cond)) { FAIL(msg); return; }
|
||||
|
||||
void test_project_generation_is_successful() {
|
||||
TEST(project_generation_is_successful);
|
||||
auto result = Sprint38IntegrationSummary::run();
|
||||
CHECK(result.projectGenerated, "project generation should pass");
|
||||
PASS();
|
||||
}
|
||||
|
||||
void test_mqtt_generation_is_successful() {
|
||||
TEST(mqtt_generation_is_successful);
|
||||
auto result = Sprint38IntegrationSummary::run();
|
||||
CHECK(result.mqttGenerated, "mqtt generation should pass");
|
||||
PASS();
|
||||
}
|
||||
|
||||
void test_sqlite_generation_is_successful() {
|
||||
TEST(sqlite_generation_is_successful);
|
||||
auto result = Sprint38IntegrationSummary::run();
|
||||
CHECK(result.sqliteGenerated, "sqlite generation should pass");
|
||||
PASS();
|
||||
}
|
||||
|
||||
void test_dispatch_generation_is_successful() {
|
||||
TEST(dispatch_generation_is_successful);
|
||||
auto result = Sprint38IntegrationSummary::run();
|
||||
CHECK(result.dispatchGenerated, "dispatch generation should pass");
|
||||
PASS();
|
||||
}
|
||||
|
||||
void test_cmake_ready_signal_is_true() {
|
||||
TEST(cmake_ready_signal_is_true);
|
||||
auto result = Sprint38IntegrationSummary::run();
|
||||
CHECK(result.cmakeReady, "cmake should be ready");
|
||||
PASS();
|
||||
}
|
||||
|
||||
void test_main_entry_signal_is_true() {
|
||||
TEST(main_entry_signal_is_true);
|
||||
auto result = Sprint38IntegrationSummary::run();
|
||||
CHECK(result.hasMainEntry, "main entry should exist");
|
||||
PASS();
|
||||
}
|
||||
|
||||
void test_topic_handlers_signal_is_true() {
|
||||
TEST(topic_handlers_signal_is_true);
|
||||
auto result = Sprint38IntegrationSummary::run();
|
||||
CHECK(result.hasTopicHandlers, "topic handlers should be present");
|
||||
PASS();
|
||||
}
|
||||
|
||||
void test_compile_ready_signal_is_true() {
|
||||
TEST(compile_ready_signal_is_true);
|
||||
auto result = Sprint38IntegrationSummary::run();
|
||||
CHECK(result.compileReady, "compile-ready should be true");
|
||||
PASS();
|
||||
}
|
||||
|
||||
int main() {
|
||||
std::cout << "Step 643: Sprint 38 integration + summary\n";
|
||||
|
||||
test_project_generation_is_successful();
|
||||
test_mqtt_generation_is_successful();
|
||||
test_sqlite_generation_is_successful();
|
||||
test_dispatch_generation_is_successful();
|
||||
test_cmake_ready_signal_is_true();
|
||||
test_main_entry_signal_is_true();
|
||||
test_topic_handlers_signal_is_true();
|
||||
test_compile_ready_signal_is_true();
|
||||
|
||||
std::cout << "\nResults: " << passed << "/" << (passed + failed) << " passed\n";
|
||||
return failed == 0 ? 0 : 1;
|
||||
}
|
||||
Reference in New Issue
Block a user