Skip to content

Commit ac33761

Browse files
author
thk123
committed
Use raw strings to avoid unnecessary escaping
1 parent 4201db9 commit ac33761

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

unit/java_bytecode/java_bytecode_convert_method/convert_invoke_dynamic.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ SCENARIO(
176176
symbol_table.lookup_ref("java::LocalLambdas.test:()V").value);
177177

178178
const std::string function_prefix_regex_str =
179-
"java::LocalLambdas\\.test:\\(\\)V";
179+
R"(java::LocalLambdas\.test:\(\)V)";
180180

181181
THEN(
182182
"The local variable should be assigned a temp object implementing "
@@ -192,7 +192,7 @@ SCENARIO(
192192
symbol_table,
193193
instructions,
194194
test_data,
195-
std::regex(function_prefix_regex_str + "::\\d+::simpleLambda$"));
195+
std::regex(function_prefix_regex_str + R"(::\d+::simpleLambda$)"));
196196
}
197197
THEN(
198198
"The local variable should be assigned a non-null pointer to a "
@@ -219,7 +219,7 @@ SCENARIO(
219219
symbol_table,
220220
instructions,
221221
test_data,
222-
std::regex(function_prefix_regex_str + "::\\d+::paramLambda$"));
222+
std::regex(function_prefix_regex_str + R"(::\d+::paramLambda$)"));
223223
}
224224
THEN(
225225
"The local variable should be assigned a non-null pointer to a "
@@ -247,7 +247,7 @@ SCENARIO(
247247
instructions,
248248
test_data,
249249
std::regex(
250-
function_prefix_regex_str + "::\\d+::arrayParamLambda$"));
250+
function_prefix_regex_str + R"(::\d+::arrayParamLambda$)"));
251251
}
252252
THEN(
253253
"The local variable should be assigned a temp object implementing "
@@ -264,7 +264,7 @@ SCENARIO(
264264
instructions,
265265
test_data,
266266
std::regex(
267-
function_prefix_regex_str + "::\\d+::returnPrimitiveLambda"));
267+
function_prefix_regex_str + R"(::\d+::returnPrimitiveLambda$)"));
268268
}
269269
THEN(
270270
"The local variable should be assigned a temp object implementing "
@@ -286,7 +286,7 @@ SCENARIO(
286286
instructions,
287287
test_data,
288288
std::regex(
289-
function_prefix_regex_str + "::\\d+::returnReferenceLambda"));
289+
function_prefix_regex_str + R"(::\d+::returnReferenceLambda$)"));
290290
}
291291
THEN(
292292
"The local variable should be assigned a temp object implementing "
@@ -307,7 +307,7 @@ SCENARIO(
307307
test_data,
308308
std::regex(
309309
function_prefix_regex_str +
310-
"::\\d+::returningSpecalisedGenericLambda"));
310+
R"(::\d+::returningSpecalisedGenericLambda$)"));
311311
}
312312
// TODO[TG-2482]: Tests for local lambdas that capture variables
313313
}

0 commit comments

Comments
 (0)