mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-16 01:28:00 +00:00
400d672e81
- RPC: added CLI command to start session - all input bytes goes into RPC, all RPC output goes into VCP - RPC: added command to close session (actually it only notifies transport layer) - RPC: added recursive rmdir - RPC: hard-coded listing for root directory (any, ext, int) - Fixed CLI leak - Fixed furi_record_delete leak - Unit tests: repaired - Unit tests: corrected output - remove excess, change dots with progress spinner - Unit tests: added leak check - Unit tests: SD mount check before start Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
67 lines
1.2 KiB
C
67 lines
1.2 KiB
C
#include <stdio.h>
|
|
#include <furi.h>
|
|
#include "minunit.h"
|
|
|
|
// v2 tests
|
|
void test_furi_create_open();
|
|
void test_furi_valuemutex();
|
|
void test_furi_concurrent_access();
|
|
void test_furi_pubsub();
|
|
|
|
void test_furi_memmgr();
|
|
|
|
static int foo = 0;
|
|
|
|
void test_setup(void) {
|
|
foo = 7;
|
|
}
|
|
|
|
void test_teardown(void) {
|
|
/* Nothing */
|
|
}
|
|
|
|
MU_TEST(test_check) {
|
|
mu_check(foo != 6);
|
|
}
|
|
|
|
// v2 tests
|
|
MU_TEST(mu_test_furi_create_open) {
|
|
test_furi_create_open();
|
|
}
|
|
|
|
MU_TEST(mu_test_furi_valuemutex) {
|
|
test_furi_valuemutex();
|
|
}
|
|
|
|
MU_TEST(mu_test_furi_concurrent_access) {
|
|
test_furi_concurrent_access();
|
|
}
|
|
|
|
MU_TEST(mu_test_furi_pubsub) {
|
|
test_furi_pubsub();
|
|
}
|
|
|
|
MU_TEST(mu_test_furi_memmgr) {
|
|
// this test is not accurate, but gives a basic understanding
|
|
// that memory management is working fine
|
|
test_furi_memmgr();
|
|
}
|
|
|
|
MU_TEST_SUITE(test_suite) {
|
|
MU_SUITE_CONFIGURE(&test_setup, &test_teardown);
|
|
|
|
MU_RUN_TEST(test_check);
|
|
|
|
// v2 tests
|
|
MU_RUN_TEST(mu_test_furi_create_open);
|
|
MU_RUN_TEST(mu_test_furi_valuemutex);
|
|
MU_RUN_TEST(mu_test_furi_concurrent_access);
|
|
MU_RUN_TEST(mu_test_furi_pubsub);
|
|
MU_RUN_TEST(mu_test_furi_memmgr);
|
|
}
|
|
|
|
int run_minunit() {
|
|
MU_RUN_SUITE(test_suite);
|
|
|
|
return MU_EXIT_CODE;
|
|
}
|