mirror of
https://codeberg.org/vyn/mirai.git
synced 2025-07-02 09:23:18 +00:00
Improve startup time
This commit is contained in:
parent
d90bfbc483
commit
597ea0ac2d
10 changed files with 82 additions and 23 deletions
|
@ -15,7 +15,7 @@ TEST_CASE("Creating task from string")
|
|||
{
|
||||
SECTION("All properties")
|
||||
{
|
||||
auto task = mirai::TodoMdFormat::StringToTask(
|
||||
auto task = mirai::TodoMdFormat::stringToTask(
|
||||
"- [X] 08:00-10:00 > This is a test -- #mirai", "2024-04-19"
|
||||
);
|
||||
REQUIRE(task.date == "2024-04-19");
|
||||
|
@ -29,7 +29,7 @@ TEST_CASE("Creating task from string")
|
|||
|
||||
SECTION("All properties 2")
|
||||
{
|
||||
auto task = mirai::TodoMdFormat::StringToTask(
|
||||
auto task = mirai::TodoMdFormat::stringToTask(
|
||||
"- [ ] 09:00-17:00 > This is another test -- #mirai #feature", "2024-04-20"
|
||||
);
|
||||
REQUIRE(task.date == "2024-04-20");
|
||||
|
@ -44,7 +44,7 @@ TEST_CASE("Creating task from string")
|
|||
|
||||
SECTION("Only text")
|
||||
{
|
||||
auto task = mirai::TodoMdFormat::StringToTask("- [ ] This is another test", "");
|
||||
auto task = mirai::TodoMdFormat::stringToTask("- [ ] This is another test", "");
|
||||
REQUIRE(task.date == "");
|
||||
REQUIRE(task.tags.size() == 0);
|
||||
REQUIRE(task.text == "This is another test");
|
||||
|
@ -53,7 +53,7 @@ TEST_CASE("Creating task from string")
|
|||
|
||||
SECTION("Only text with a date")
|
||||
{
|
||||
auto task = mirai::TodoMdFormat::StringToTask("- [X] This is another test", "2025-02-03");
|
||||
auto task = mirai::TodoMdFormat::stringToTask("- [X] This is another test", "2025-02-03");
|
||||
REQUIRE(task.date == "2025-02-03");
|
||||
REQUIRE(task.tags.size() == 0);
|
||||
REQUIRE(task.text == "This is another test");
|
||||
|
@ -62,7 +62,7 @@ TEST_CASE("Creating task from string")
|
|||
|
||||
SECTION("Tags before -- are not tags")
|
||||
{
|
||||
auto task = mirai::TodoMdFormat::StringToTask(
|
||||
auto task = mirai::TodoMdFormat::stringToTask(
|
||||
"- [ ] This is another test #ImNotATag -- #ImATag", ""
|
||||
);
|
||||
REQUIRE(task.date == "");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue