mirror of
https://codeberg.org/vyn/mirai.git
synced 2025-07-03 01:33:19 +00:00
28 lines
824 B
C++
28 lines
824 B
C++
|
/*
|
||
|
* Mirai. Copyright (C) 2024 Vyn
|
||
|
* This file is licensed under version 3 of the GNU General Public License (GPL-3.0-only)
|
||
|
* The license can be found in the LICENSE file or at https://www.gnu.org/licenses/gpl-3.0.txt
|
||
|
*/
|
||
|
|
||
|
// TODO this is just a quick setup for later
|
||
|
|
||
|
#include "core/Mirai.h"
|
||
|
#include "core/TaskItem.h"
|
||
|
#include "core/TodoMd.h"
|
||
|
#include <catch2/catch_test_macros.hpp>
|
||
|
|
||
|
TEST_CASE("TODO make tests", "[todo]")
|
||
|
{
|
||
|
mirai::Mirai mirai;
|
||
|
auto task = mirai::TodoMdFormat::StringToTask(
|
||
|
"- [X] 08:00-10:00 > This is a test -- #mirai", "2024-04-19"
|
||
|
);
|
||
|
REQUIRE(task.date == "2024-04-19");
|
||
|
REQUIRE(task.tags.size() == 1);
|
||
|
REQUIRE(task.tags[0] == "#mirai");
|
||
|
REQUIRE(task.text == "This is a test");
|
||
|
REQUIRE(task.state == mirai::DONE);
|
||
|
REQUIRE(task.startTime == "08:00");
|
||
|
REQUIRE(task.endTime == "10:00");
|
||
|
}
|