@@ -77,10 +77,10 @@ class RegexFunctionsTest : public ::testing::TestWithParam<TestCase> {
77
77
TEST_F (RegexFunctionsTest, CaptureStringSuccessWithCombinationOfGroups) {
78
78
// combination of named and unnamed groups should return a celmap
79
79
std::vector<std::pair<CelValue, CelValue>> cel_values;
80
- cel_values.emplace_back (std::make_pair (
81
- CelValue::CreateString (google::protobuf::Arena::Create<std::string>(&arena_, " 1 " ) ),
82
- CelValue::CreateString (
83
- google::protobuf::Arena::Create<std::string>(&arena_, " user" ))));
80
+ cel_values.emplace_back (
81
+ std::make_pair ( CelValue::CreateInt64 ( 1 ),
82
+ CelValue::CreateString (
83
+ google::protobuf::Arena::Create<std::string>(&arena_, " user" ))));
84
84
cel_values.emplace_back (std::make_pair (
85
85
CelValue::CreateString (
86
86
google::protobuf::Arena::Create<std::string>(&arena_, " Username" )),
@@ -131,14 +131,14 @@ TEST_F(RegexFunctionsTest, CaptureStringSuccessWithSingleNamedGroup) {
131
131
TEST_F (RegexFunctionsTest, CaptureStringSuccessWithMultipleUnamedGroups) {
132
132
// Regex containing all unnamed groups should return a map
133
133
std::vector<std::pair<CelValue, CelValue>> cel_values;
134
- cel_values.emplace_back (std::make_pair (
135
- CelValue::CreateString (google::protobuf::Arena::Create<std::string>(&arena_, " 1 " ) ),
136
- CelValue::CreateString (
137
- google::protobuf::Arena::Create<std::string>( &arena_, " testuser" ))));
138
- cel_values.emplace_back (std::make_pair (
139
- CelValue::CreateString (google::protobuf::Arena::Create<std::string>(&arena_, " 2 " ) ),
140
- CelValue::CreateString (
141
- google::protobuf::Arena::Create<std::string>( &arena_, " testdomain" ))));
134
+ cel_values.emplace_back (
135
+ std::make_pair ( CelValue::CreateInt64 ( 1 ),
136
+ CelValue::CreateString (google::protobuf::Arena::Create<std::string> (
137
+ &arena_, " testuser" ))));
138
+ cel_values.emplace_back (
139
+ std::make_pair ( CelValue::CreateInt64 ( 2 ),
140
+ CelValue::CreateString (google::protobuf::Arena::Create<std::string> (
141
+ &arena_, " testdomain" ))));
142
142
auto container_map = google::api::expr::runtime::CreateContainerBackedMap (
143
143
absl::MakeSpan (cel_values));
144
144
// Release ownership of container_map to Arena.
0 commit comments