nix-super/tests/unit/libutil-support/tests/string_callback.cc
Robert Hensing a512f4eebc test/libutil: Add OBSERVE_STRING macro
Makes string callback easier to pass, without mistakes.
2024-04-11 17:39:21 +02:00

9 lines
185 B
C++

#include "string_callback.hh"
namespace nix::testing {
void observe_string_cb(const char * start, unsigned int n, std::string * user_data) {
*user_data = std::string(start);
}
}