Squashed 'third_party/protozero/' content from commit d5d8debf1
git-subtree-dir: third_party/protozero git-subtree-split: d5d8debf1b17c6bb652395957b76cde7787e5377
This commit is contained in:
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>
|
||||
|
||||
@@ -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];
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user