-
Notifications
You must be signed in to change notification settings - Fork 15.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hpb_proto_library: properly handle alias libraries (srcs empty, reexp…
…ort deps) PiperOrigin-RevId: 689464159
- Loading branch information
1 parent
3c91820
commit 7ef7eeb
Showing
2 changed files
with
42 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// Protocol Buffers - Google's data interchange format | ||
// Copyright 2024 Google LLC. All rights reserved. | ||
// | ||
// Use of this source code is governed by a BSD-style | ||
// license that can be found in the LICENSE file or at | ||
// https://developers.google.com/open-source/licenses/bsd | ||
|
||
#include <gtest/gtest.h> | ||
#include "google/protobuf/compiler/hpb/tests/set_alias.upb.proto.h" | ||
#include "google/protobuf/hpb/arena.h" | ||
#include "google/protobuf/hpb/hpb.h" | ||
|
||
namespace { | ||
using hpb_unittest::protos::Child; | ||
|
||
TEST(BzlCode, CheckBzlAlias) { | ||
hpb::Arena arena; | ||
auto child = hpb::CreateMessage<Child>(arena); | ||
child.set_peeps(12); | ||
ASSERT_EQ(child.peeps(), 12); | ||
} | ||
} // namespace |