1
0
mirror of https://github.com/deavmi/birchwood synced 2024-09-20 13:43:19 +02:00

Unit tests

- Added another unit test
This commit is contained in:
Tristan B. Velloza Kildaire 2023-03-17 09:11:22 +02:00
parent 0c4382d7ce
commit 3c6ee2bbbb

View File

@ -321,6 +321,19 @@ public final class Message
assert(cmp(splitted[2], "Hello this is text") == 0);
}
unittest
{
import std.stdio;
string testInput = ":Hello this is text";
bool hasTrailer;
string[] splitted = splitting(testInput, hasTrailer);
/* Trailer test */
assert(hasTrailer);
assert(cmp(splitted[0], "Hello this is text") == 0);
}
/**
* Imagine: `A:=1 A=2 :Hello`
*