M README.md => README.md +1 -2
@@ 67,11 67,10 @@ determine unit test coverage, and thus only needed during development.
```sh
meson setup ./build/ -Db_coverage=true -Doptimization=0 -Dstrip=false
+meson test -C ./build
meson compile -C ./build coverage-html
```
-FIXME: Coverage is broken.
-
The tests can only be built if stripped compilation is not enabled, as no
internal symbols would be visible to the unit tests.
M meson.build => meson.build +0 -1
@@ 17,7 17,6 @@ libprotoc = cpp.find_library(
dirs: libprotobuf.get_pkgconfig_variable('libdir'),
)
libcheck = dependency('check')
-libfmt = dependency('fmt')
public_includes = include_directories('include')
internal_includes = include_directories('src')
M src/generator/logging.hh => src/generator/logging.hh +3 -9
@@ 1,11 1,9 @@
#ifndef PB_GENERATOR_LOGGER_HH
#define PB_GENERATOR_LOGGER_HH
-#include <exception>
#include <cassert>
-
-#include <fmt/core.h>
-#include <fmt/ostream.h>
+#include <exception>
+#include <iostream>
#define GOOGLE_LOG(LEVEL) \
protobluff::LogFinisher() = \
@@ 36,10 34,6 @@
#define GOOGLE_DCHECK_GT GOOGLE_CHECK_GT
#define GOOGLE_DCHECK_GE GOOGLE_CHECK_GE
-namespace protobluff { enum class LogLevel; }
-
-template <> struct fmt::formatter<protobluff::LogLevel> : ostream_formatter {};
-
namespace protobluff {
enum class LogLevel {
INFO,
@@ 94,7 88,7 @@ namespace protobluff {
private:
friend class LogFinisher;
void Finish() {
- fmt::print(stderr, "{}: {}:{}: {}", level_, filename_, line_, message_);
+ std::cerr << level_ << ": " << filename_ << ":" << line_ << ": " << message_ << std::endl;
if (level_ == LogLevel::FATAL) {
std::terminate();
}
M src/generator/meson.build => src/generator/meson.build +1 -1
@@ 11,5 11,5 @@ protoc_gen_protobluff = executable(
'protoc-gen-protobluff.cc',
'strutil.cc',
include_directories: [public_includes, internal_includes],
- dependencies: [libprotobuf, libprotoc, libfmt],
+ dependencies: [libprotobuf, libprotoc],
)