blob: dfd9151f2fb25d8ee58d6f8096695cf1be666311 [file] [log] [blame]
Parker Schuh149161a2016-03-16 21:57:21 -07001#include "gtest/gtest.h"
2
3#include "aos/common/logging/logging.h"
4#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());
25 CHECK_NOTNULL(msg);
26}
27
28} // namespace
29} // namespace protobuf
30} // namespace aos