Updated bundled protozero to v1.7.0
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
syntax = "proto2";
|
||||
|
||||
option optimize_for = LITE_RUNTIME;
|
||||
|
||||
|
||||
+1
-1
@@ -126,7 +126,7 @@ TEST_CASE("write bool field using moved pbf_builder") {
|
||||
|
||||
protozero::pbf_builder<TestBoolean::Test> pw{std::move(pw2)};
|
||||
REQUIRE(pw.valid());
|
||||
REQUIRE_FALSE(pw2.valid()); // NOLINT(hicpp-invalid-access-moved, bugprone-use-after-move)
|
||||
REQUIRE_FALSE(pw2.valid()); // NOLINT(hicpp-invalid-access-moved, bugprone-use-after-move, clang-analyzer-cplusplus.Move)
|
||||
|
||||
SECTION("false") {
|
||||
pw.add_bool(TestBoolean::Test::required_bool_b, false);
|
||||
|
||||
+2
-1
@@ -1,8 +1,9 @@
|
||||
|
||||
#include <testcase.hpp>
|
||||
|
||||
#include "testcase.pb.h"
|
||||
|
||||
int main(int c, char *argv[]) {
|
||||
int main() {
|
||||
TestBoolean::Test msg;
|
||||
|
||||
msg.set_b(0);
|
||||
|
||||
+7
-6
@@ -1,21 +1,22 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
#include <test.hpp> // IWYU pragma: keep
|
||||
#include <buffer.hpp>
|
||||
|
||||
#include "t/bool/bool_testcase.pb.h"
|
||||
|
||||
TEST_CASE("write bool field and check with libprotobuf") {
|
||||
TEMPLATE_TEST_CASE("write bool field and check with libprotobuf", "",
|
||||
buffer_test_string, buffer_test_vector, buffer_test_array, buffer_test_external) {
|
||||
|
||||
std::string buffer;
|
||||
protozero::pbf_writer pw{buffer};
|
||||
TestType buffer;
|
||||
typename TestType::writer_type pw{buffer.buffer()};
|
||||
|
||||
TestBoolean::Test msg;
|
||||
|
||||
SECTION("false") {
|
||||
pw.add_bool(1, false);
|
||||
|
||||
msg.ParseFromString(buffer);
|
||||
msg.ParseFromArray(buffer.data(), buffer.size());
|
||||
|
||||
REQUIRE_FALSE(msg.b());
|
||||
}
|
||||
@@ -23,7 +24,7 @@ TEST_CASE("write bool field and check with libprotobuf") {
|
||||
SECTION("true") {
|
||||
pw.add_bool(1, true);
|
||||
|
||||
msg.ParseFromString(buffer);
|
||||
msg.ParseFromArray(buffer.data(), buffer.size());
|
||||
|
||||
REQUIRE(msg.b());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user