Squashed 'third_party/protozero/' content from commit d5d8debf1

git-subtree-dir: third_party/protozero
git-subtree-split: d5d8debf1b17c6bb652395957b76cde7787e5377
This commit is contained in:
Michael Krasnyk
2018-04-19 22:03:49 +03:00
commit 68019a1fb2
321 changed files with 26809 additions and 0 deletions
Binary file not shown.
@@ -0,0 +1,2 @@

@@ -0,0 +1,9 @@
#include <test.hpp>
#define PBF_TYPE int64
#define PBF_TYPE_IS_SIGNED 1
using cpp_type = int64_t;
#include <packed_access.hpp>
+22
View File
@@ -0,0 +1,22 @@
#include <testcase.hpp>
#include "testcase.pb.h"
int main(int c, char *argv[]) {
TestRepeatedPackedInt64::Test msg;
write_to_file(msg, "data-empty.pbf");
msg.add_i(17LL);
write_to_file(msg, "data-one.pbf");
msg.add_i(200);
msg.add_i(0LL);
msg.add_i(1LL);
msg.add_i(std::numeric_limits<int64_t>::max());
msg.add_i(-200);
msg.add_i(-1LL);
msg.add_i(std::numeric_limits<int64_t>::min());
write_to_file(msg, "data-many.pbf");
}
@@ -0,0 +1,11 @@
option optimize_for = LITE_RUNTIME;
package TestRepeatedPackedInt64;
message Test {
repeated int64 i = 1 [packed=true];
}