Ersa Wearable Platform
Embedded smartwatch firmware and application framework
Loading...
Searching...
No Matches
Classes | Macros | Functions | Variables
main_test.cpp File Reference
#include <stdio.h>
#include <assert.h>
#include <string.h>
#include "ersa/common/types.h"
#include "ersa/common/calendar_time.h"
#include "ersa/events/event_bus.h"
#include "ersa/app/application_manager.h"
#include "ersa/app/watchface.h"
#include "ersa/app/complication.h"
#include "ersa/services/time_service.h"
#include "ersa/services/power_manager.h"
#include "ersa/services/display_manager.h"
#include "ersa/services/network_manager.h"
#include "ersa/services/storage_service.h"
#include "ersa/services/settings_service.h"
#include "ersa/services/logging_service.h"
#include "ersa/services/bluetooth_manager.h"
#include "ersa/services/session_stats.h"
#include "ersa/runtime/scheduler.h"
#include "ersa/system.h"
#include "mocks/mock_display.h"
#include "mocks/mock_rtc.h"
#include "mocks/mock_battery.h"
#include "mocks/mock_bluetooth.h"
#include "mocks/mock_wifi.h"
#include "mocks/mock_power_management.h"
#include "mocks/mock_console.h"
#include "ersa/config/system_defaults.h"
#include "ersa/config/ui_strings.h"
Include dependency graph for main_test.cpp:

Classes

class  TestAppA
 
class  TestAppB
 
class  BatteryComplication
 

Macros

#define TEST_ASSERT(cond, msg)
 
#define TEST_PASS()
 

Functions

void test_display_hal_contract ()
 
void test_runtime_scheduler ()
 
void test_calendar_time ()
 
void test_console_hal_contract ()
 
void test_power_management_hal_contract ()
 
static void onTestEvent (const events::Event &event, void *userData)
 
void test_event_bus ()
 
void test_application_manager ()
 
static void onTimeEvent (const events::Event &event, void *userData)
 
void test_time_service ()
 
void test_power_manager ()
 
void test_display_manager ()
 
void test_network_manager ()
 
void test_storage_service ()
 
void test_settings_service ()
 
void test_complications ()
 
static time_t testParseHttpDateToEpoch (const char *str)
 
void test_config_and_fallbacks ()
 
void test_bluetooth_manager ()
 
void test_session_stats ()
 
void test_apple_protocols ()
 
int main ()
 

Variables

static int testsPassed = 0
 
static int g_subCallCount = 0
 
static events::Event g_lastReceivedEvent
 
static int g_timeEventCount = 0
 

Macro Definition Documentation

◆ TEST_ASSERT

#define TEST_ASSERT (   cond,
  msg 
)
Value:
do { \
if (!(cond)) { \
fprintf(stderr, "FAILED: %s (line %d): %s\n", __func__, __LINE__, msg); \
assert(cond); \
} \
} while(0)

◆ TEST_PASS

#define TEST_PASS ( )
Value:
do { \
printf("PASS: %s\n", __func__); \
} while(0)
static int testsPassed
Definition main_test.cpp:32

Function Documentation

◆ main()

int main ( )

◆ onTestEvent()

static void onTestEvent ( const events::Event &  event,
void *  userData 
)
static

◆ onTimeEvent()

static void onTimeEvent ( const events::Event &  event,
void *  userData 
)
static

◆ test_apple_protocols()

void test_apple_protocols ( )

◆ test_application_manager()

void test_application_manager ( )

◆ test_bluetooth_manager()

void test_bluetooth_manager ( )

◆ test_calendar_time()

void test_calendar_time ( )

◆ test_complications()

void test_complications ( )

◆ test_config_and_fallbacks()

void test_config_and_fallbacks ( )

◆ test_console_hal_contract()

void test_console_hal_contract ( )

◆ test_display_hal_contract()

void test_display_hal_contract ( )

◆ test_display_manager()

void test_display_manager ( )

◆ test_event_bus()

void test_event_bus ( )

◆ test_network_manager()

void test_network_manager ( )

◆ test_power_management_hal_contract()

void test_power_management_hal_contract ( )

◆ test_power_manager()

void test_power_manager ( )

◆ test_runtime_scheduler()

void test_runtime_scheduler ( )

◆ test_session_stats()

void test_session_stats ( )

◆ test_settings_service()

void test_settings_service ( )

◆ test_storage_service()

void test_storage_service ( )

◆ test_time_service()

void test_time_service ( )

◆ testParseHttpDateToEpoch()

static time_t testParseHttpDateToEpoch ( const char *  str)
static

Variable Documentation

◆ g_lastReceivedEvent

events::Event g_lastReceivedEvent
static

◆ g_subCallCount

int g_subCallCount = 0
static

◆ g_timeEventCount

int g_timeEventCount = 0
static

◆ testsPassed

int testsPassed = 0
static