log: encapsulate logger

Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
This commit is contained in:
2023-09-23 21:09:44 +05:30
parent c3bf8b0ae8
commit 91a82eec7c
14 changed files with 158 additions and 97 deletions

8
tests/main.cc Normal file
View File

@@ -0,0 +1,8 @@
#include "util/loglevel.hh"
#include <catch2/catch_session.hpp>
int
main(int argc, char* argv[]) {
matar::set_log_level(matar::LogLevel::Off);
return Catch::Session().run(argc, argv);
}

View File

@@ -4,11 +4,13 @@ tests_deps = [
src = include_directories('../src')
tests_sources = files()
tests_sources = files(
'main.cc'
)
subdir('cpu')
catch2 = dependency('catch2-with-main', version: '>=3.4.0', static: true)
catch2 = dependency('catch2', version: '>=3.4.0', static: true)
catch2_tests = executable(
'matar_tests',
tests_sources,