Skip to content

Commit 547cf84

Browse files
committed
style: Rename variables in test
1 parent 2d5d924 commit 547cf84

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

test/parser.test.cpp

+9-9
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ TEST_CASE("Parse with legal token sequence", "[parse]") {
3535

3636
unsigned char buf[1024];
3737
size_t len;
38-
Token* last = parse(tk, buf, 1024, &len);
38+
Token* end = parse(tk, buf, 1024, &len);
3939

40-
REQUIRE(last != NULL);
41-
REQUIRE(last->kind == TK_EOF);
40+
REQUIRE(end != NULL);
41+
REQUIRE(end->kind == TK_EOF);
4242
REQUIRE(len == 10);
4343

4444
for (size_t i = 0; i < len; ++i) {
@@ -65,21 +65,21 @@ TEST_CASE("Parse with not enough buffer", "[parse]") {
6565

6666
unsigned char buf[8];
6767
size_t len;
68-
Token* last = parse(tk, buf, 8, &len);
68+
Token* end = parse(tk, buf, 8, &len);
6969

70-
REQUIRE(last != NULL);
71-
REQUIRE(last->kind != TK_EOF);
70+
REQUIRE(end != NULL);
71+
REQUIRE(end->kind != TK_EOF);
7272
REQUIRE(len == 8);
7373

7474
for (size_t i = 0; i < len; ++i) {
7575
INFO("i = " << i);
7676
REQUIRE(buf[i] == expect[i]);
7777
}
7878

79-
Token* new_last = parse(last, buf, 8, &len);
79+
Token* new_end = parse(end, buf, 8, &len);
8080

81-
REQUIRE(new_last != NULL);
82-
REQUIRE(new_last->kind == TK_EOF);
81+
REQUIRE(new_end != NULL);
82+
REQUIRE(new_end->kind == TK_EOF);
8383
REQUIRE(len == 2);
8484

8585
for (size_t i = 0; i < len; ++i) {

0 commit comments

Comments
 (0)