Skip to content

Commit b959bfb

Browse files
CEL Dev Teamcopybara-github
authored andcommitted
No public description
PiperOrigin-RevId: 942390020
1 parent a3fb693 commit b959bfb

5 files changed

Lines changed: 15 additions & 15 deletions

File tree

runtime/activation.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,14 +102,14 @@ std::vector<FunctionOverloadReference> Activation::FindFunctionOverloads(
102102

103103
bool Activation::InsertOrAssignValue(absl::string_view name, Value value) {
104104
return values_
105-
.insert_or_assign(name, ValueEntry{std::move(value), absl::nullopt})
105+
.insert_or_assign(name, ValueEntry{std::move(value), std::nullopt})
106106
.second;
107107
}
108108

109109
bool Activation::InsertOrAssignValueProvider(absl::string_view name,
110110
ValueProvider provider) {
111111
return values_
112-
.insert_or_assign(name, ValueEntry{absl::nullopt, std::move(provider)})
112+
.insert_or_assign(name, ValueEntry{std::nullopt, std::move(provider)})
113113
.second;
114114
}
115115

runtime/activation_test.cc

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ TEST_F(ActivationTest, ValueNotFound) {
7979

8080
EXPECT_THAT(activation.FindVariable("var1", descriptor_pool(),
8181
message_factory(), arena()),
82-
IsOkAndHolds(Eq(absl::nullopt)));
82+
IsOkAndHolds(Eq(std::nullopt)));
8383
}
8484

8585
TEST_F(ActivationTest, InsertValue) {
@@ -122,11 +122,11 @@ TEST_F(ActivationTest, InsertProviderForwardsNotFound) {
122122
"var1",
123123
[](absl::string_view name, const google::protobuf::DescriptorPool* absl_nonnull,
124124
google::protobuf::MessageFactory* absl_nonnull,
125-
google::protobuf::Arena* absl_nonnull) { return absl::nullopt; }));
125+
google::protobuf::Arena* absl_nonnull) { return std::nullopt; }));
126126

127127
EXPECT_THAT(activation.FindVariable("var1", descriptor_pool(),
128128
message_factory(), arena()),
129-
IsOkAndHolds(Eq(absl::nullopt)));
129+
IsOkAndHolds(Eq(std::nullopt)));
130130
}
131131

132132
TEST_F(ActivationTest, InsertProviderForwardsStatus) {
@@ -355,10 +355,10 @@ TEST_F(ActivationTest, MoveAssignment) {
355355
// NOLINTBEGIN(bugprone-use-after-move)
356356
EXPECT_THAT(moved_from.FindVariable("val", descriptor_pool(),
357357
message_factory(), arena()),
358-
IsOkAndHolds(Eq(absl::nullopt)));
358+
IsOkAndHolds(Eq(std::nullopt)));
359359
EXPECT_THAT(moved_from.FindVariable("val_provided", descriptor_pool(),
360360
message_factory(), arena()),
361-
IsOkAndHolds(Eq(absl::nullopt)));
361+
IsOkAndHolds(Eq(std::nullopt)));
362362
EXPECT_THAT(moved_from.FindFunctionOverloads("Fn"), SizeIs(0));
363363
EXPECT_THAT(moved_from.GetUnknownAttributes(), SizeIs(0));
364364
EXPECT_THAT(moved_from.GetMissingAttributes(), SizeIs(0));
@@ -405,10 +405,10 @@ TEST_F(ActivationTest, MoveCtor) {
405405
// NOLINTBEGIN(bugprone-use-after-move)
406406
EXPECT_THAT(moved_from.FindVariable("val", descriptor_pool(),
407407
message_factory(), arena()),
408-
IsOkAndHolds(Eq(absl::nullopt)));
408+
IsOkAndHolds(Eq(std::nullopt)));
409409
EXPECT_THAT(moved_from.FindVariable("val_provided", descriptor_pool(),
410410
message_factory(), arena()),
411-
IsOkAndHolds(Eq(absl::nullopt)));
411+
IsOkAndHolds(Eq(std::nullopt)));
412412
EXPECT_THAT(moved_from.FindFunctionOverloads("Fn"), SizeIs(0));
413413
EXPECT_THAT(moved_from.GetUnknownAttributes(), SizeIs(0));
414414
EXPECT_THAT(moved_from.GetMissingAttributes(), SizeIs(0));

runtime/embedder_context_test.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ TEST(EmbedderContextTest, From) {
2929
struct TestScope {};
3030
EmbedderContext context = EmbedderContext::From<TestScope>(int64_t{42});
3131
EXPECT_THAT((context.Get<TestScope, int64_t>()), Optional(42));
32-
EXPECT_EQ((context.Get<TestScope, uint64_t>()), absl::nullopt);
32+
EXPECT_EQ((context.Get<TestScope, uint64_t>()), std::nullopt);
3333

3434
EmbedderContext context2 = EmbedderContext::From<TestScope>(uint64_t{42});
3535
EXPECT_THAT((context2.Get<TestScope, uint64_t>()), Optional(42));
36-
EXPECT_EQ((context2.Get<TestScope, int64_t>()), absl::nullopt);
36+
EXPECT_EQ((context2.Get<TestScope, int64_t>()), std::nullopt);
3737

3838
// Side effect, but checking that we keep a dense range.
3939
EXPECT_EQ(cel::TypeIdInSet<TestScope>::Size(), 2);
@@ -47,7 +47,7 @@ TEST(EmbedderContextTest, FromOutOfLine) {
4747
EXPECT_THAT((context.Get<TestScope, int64_t>()), Optional(42));
4848
EXPECT_THAT((context.Get<TestScope, uint64_t>()), Optional(43));
4949
EXPECT_THAT((context.Get<TestScope, double>()), Optional(44));
50-
EXPECT_EQ((context.Get<TestScope, bool>()), absl::nullopt);
50+
EXPECT_EQ((context.Get<TestScope, bool>()), std::nullopt);
5151

5252
// Note: Referencing a type not intended to be stored will still reserve a
5353
// slot in the TypeIdInSet.
@@ -76,7 +76,7 @@ TEST(EmbedderContextTest, FromPtrs) {
7676
TEST(EmbedderContextTest, FromDefaultScope) {
7777
EmbedderContext context = EmbedderContext::From(int64_t{42});
7878
EXPECT_THAT((context.Get<int64_t>()), Optional(42));
79-
EXPECT_EQ((context.Get<uint64_t>()), absl::nullopt);
79+
EXPECT_EQ((context.Get<uint64_t>()), std::nullopt);
8080
}
8181

8282
// These death assertions are only enabled when compiled in debug mode.

runtime/function_registry.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class ActivationFunctionProviderImpl
5050
std::vector<cel::FunctionOverloadReference> overloads =
5151
activation.FindFunctionOverloads(descriptor.name());
5252

53-
std::optional<FunctionOverloadReference> matching_overload = absl::nullopt;
53+
std::optional<FunctionOverloadReference> matching_overload = std::nullopt;
5454

5555
for (const auto& overload : overloads) {
5656
if (overload.descriptor.ShapeMatches(descriptor)) {

runtime/function_registry_test.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ TEST(FunctionRegistryTest, DefaultLazyProviderNoOverloadFound) {
124124
provider.GetFunction({"LazyFunc", false, {cel::Kind::kInt64}},
125125
activation));
126126

127-
EXPECT_EQ(func, absl::nullopt);
127+
EXPECT_EQ(func, std::nullopt);
128128
}
129129

130130
TEST(FunctionRegistryTest, DefaultLazyProviderReturnsImpl) {

0 commit comments

Comments
 (0)