blob: a07ceeac3c5342737051d9a2806ef8b931eb794a [file] [log] [blame]
Parker Schuh149161a2016-03-16 21:57:21 -07001#include "gtest/gtest.h"
2
John Park33858a32018-09-28 23:05:48 -07003#include "aos/logging/logging.h"
Parker Schuh149161a2016-03-16 21:57:21 -07004#include "aos/protobuf/stack_arena.h"
5#include "aos/testing/test_logging.h"
6
7namespace aos {
8namespace protobuf {
9namespace {
10
11struct TestStruct {
12 int a;
13 int b;
14 int c;
15};
16
17class StackProtoArenaTest : public ::testing::Test {};
18
19TEST_F(StackProtoArenaTest, Basic) {
20 ::aos::testing::EnableTestLogging();
21 StackProtoArena<164> stack_arena;
22
23 TestStruct* msg =
24 google::protobuf::Arena::Create<TestStruct>(stack_arena.arena());
Austin Schuhf257f3c2019-10-27 21:00:43 -070025 AOS_CHECK_NOTNULL(msg);
Parker Schuh149161a2016-03-16 21:57:21 -070026}
27
28} // namespace
29} // namespace protobuf
30} // namespace aos