Skip to content

Commit 195cd69

Browse files
committed
refactor(test): inline unnecessary variables
1 parent 7239320 commit 195cd69

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

test/test-lex.cpp

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2962,11 +2962,9 @@ TEST_F(Test_Lex, jsx_nested_children) {
29622962
void Test_Lex::check_single_token(String8_View input,
29632963
String8_View expected_identifier_name,
29642964
Source_Location local_caller) {
2965-
static Source_Location caller;
2966-
caller = local_caller;
29672965
this->check_single_token_with_errors(input,
29682966
Span<const Diagnostic_Assertion>(),
2969-
expected_identifier_name, caller);
2967+
expected_identifier_name, local_caller);
29702968
}
29712969

29722970
void Test_Lex::check_single_token_with_errors(
@@ -3012,21 +3010,17 @@ void Test_Lex::check_single_token_with_errors(
30123010
void Test_Lex::check_tokens(
30133011
String8_View input, std::initializer_list<Token_Type> expected_token_types,
30143012
Source_Location local_caller) {
3015-
static Source_Location caller;
3016-
caller = local_caller;
30173013
this->check_tokens_with_errors(input, Span<const Diagnostic_Assertion>(),
3018-
expected_token_types, caller);
3014+
expected_token_types, local_caller);
30193015
}
30203016

30213017
void Test_Lex::check_tokens(
30223018
Padded_String_View input,
30233019
std::initializer_list<Token_Type> expected_token_types,
30243020
Source_Location local_caller) {
3025-
static Source_Location caller;
3026-
caller = local_caller;
30273021
this->check_tokens_with_errors(input.string_view(),
30283022
Span<const Diagnostic_Assertion>(),
3029-
expected_token_types, caller);
3023+
expected_token_types, local_caller);
30303024
}
30313025

30323026
void Test_Lex::check_tokens_with_errors(

0 commit comments

Comments
 (0)