stdex/UnitTests/main.cpp
Simon Rozman be273d4263 exception: Add exception_msg helper
Signed-off-by: Simon Rozman <simon@rozman.si>
2025-05-13 09:36:22 +02:00

47 lines
1.1 KiB
C++

/*
SPDX-License-Identifier: MIT
Copyright © 2023-2025 Amebis
*/
#include "pch.hpp"
#include <iostream>
int main(int, const char *[])
{
try {
UnitTests::hash::crc32();
UnitTests::hash::md5();
UnitTests::hash::sha1();
UnitTests::langid::from_rfc1766();
UnitTests::math::add();
UnitTests::math::mul();
UnitTests::parser::http_test();
UnitTests::parser::sgml_test();
UnitTests::parser::wtest();
UnitTests::pool::test();
UnitTests::ring::test();
UnitTests::sgml::sgml2str();
UnitTests::sgml::str2sgml();
UnitTests::stream::async();
UnitTests::stream::file_stat();
UnitTests::stream::open_close();
UnitTests::stream::replicator();
UnitTests::string::strncpy();
UnitTests::string::sprintf();
UnitTests::string::snprintf();
UnitTests::unicode::charset_encoder();
UnitTests::unicode::normalize();
UnitTests::unicode::str2wstr();
UnitTests::unicode::wstr2str();
UnitTests::watchdog::test();
UnitTests::zlib::test();
std::cout << "PASS\n";
return 0;
}
catch (const std::exception& ex) {
std::cerr << stdex::exception_msg(ex) << " FAIL\n";
return 1;
}
}