TeaSpeakLibrary/test/BBTest.cpp

29 lines
1.0 KiB
C++
Raw Normal View History

2019-06-26 16:11:22 -04:00
#include <string>
#include <src/bbcode/bbcodes.h>
#include <src/misc/advanced_mutex.h>
#include <iostream>
#include <chrono>
#define TEST(message, tag) \
cout << "Testing '" << message << "' for " << tag << " results in " << bbcode::sloppy::has_tag(message, {tag}) << endl;
using namespace std;
using namespace std::chrono;
int main() {
2020-01-23 20:49:59 -05:00
/*
auto beg = system_clock::now();
TEST("Hello [img]World[/img]", "img");
TEST("[img]World[/img] Hello", "img");
TEST("[img]World[img] Hello", "img");
TEST("[img=https://www.teaspeak.de]World[/img] Hello", "img");
TEST("\\[img]World[/img] Hello", "img");
TEST("[img]World[img] Hello", "img");
TEST("[img=https://www.teaspeak.de]World[/img] Hello", "img");
TEST("\\[img]World[/img] Hello", "img");
TEST("[img=https://www.teaspeak.de]World[/img] Hello", "img");
TEST("\\[img]World[/img] Hello", "img");
auto end = system_clock::now();
cout << "Needed nanoseconds: " << duration_cast<nanoseconds>(end - beg).count() << endl;
*/
return 0;
2019-06-26 16:11:22 -04:00
}