mirror of
https://github.com/mudita/MuditaOS.git
synced 2026-10-24 23:48:31 -04:00
tests: add proper catch2 handling
Add proper catch2 support: - add catch2 as a submodule - add cmake function to add test easily - discover each test in test binary - remove copies of catch.hpp - do not try to process tests for rt1051 Do not test internals of utf8, only public interface (nasty bugs could occur otherwise). Signed-off-by: Marcin Smoczyński <smoczynski.marcin@gmail.com>
This commit is contained in:
1 parent
b27dec2025
commit
a9cb37d7f4
54 files changed
+337
-109880
No files matched your search
@@ -8,23 +8,22 @@
|
||||
* @details
|
||||
*/
|
||||
|
||||
#include <catch2/catch.hpp>
|
||||
|
||||
#include "Database/Database.hpp"
|
||||
#include "Databases/ContactsDB.hpp"
|
||||
#include "Databases/SmsDB.hpp"
|
||||
#include "Interface/ContactRecord.hpp"
|
||||
#include "Interface/SMSRecord.hpp"
|
||||
#include "Interface/ThreadRecord.hpp"
|
||||
#include "vfs.hpp"
|
||||
|
||||
#include "catch.hpp"
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <algorithm>
|
||||
|
||||
#include <iostream>
|
||||
#include <Interface/ContactRecord.hpp>
|
||||
|
||||
#include "../Database/Database.hpp"
|
||||
#include "../Databases/ContactsDB.hpp"
|
||||
#include "../Databases/SmsDB.hpp"
|
||||
#include "../Interface/SMSRecord.hpp"
|
||||
#include "../Interface/ThreadRecord.hpp"
|
||||
#include <cstdint>
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
|
||||
TEST_CASE("Thread Record tests")
|
||||
{
|
||||
@@ -33,7 +32,7 @@ TEST_CASE("Thread Record tests")
|
||||
vfs.remove(ContactsDB::GetDBName());
|
||||
vfs.remove(SmsDB::GetDBName());
|
||||
|
||||
auto smsDB = std::make_unique<SmsDB>();
|
||||
auto smsDB = std::make_unique<SmsDB>();
|
||||
REQUIRE(smsDB->IsInitialized());
|
||||
auto contactsDB = std::make_unique<ContactsDB>();
|
||||
REQUIRE(contactsDB->IsInitialized());
|
||||
@@ -105,4 +104,4 @@ TEST_CASE("Thread Record tests")
|
||||
REQUIRE(threadRecordInterface1.GetCount() == 0);
|
||||
|
||||
Database::Deinitialize();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user