Skip to content

Commit 19f8f03

Browse files
Copilotsyoyo
andcommitted
Deep review: improve object name test comment clarity
Co-authored-by: syoyo <18676+syoyo@users.noreply.github.com>
1 parent 12de488 commit 19f8f03

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tests/tester.cc

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4174,8 +4174,11 @@ void test_loadobjopt_object_name_trimming() {
41744174
obj_text, obj_len, config);
41754175
TEST_CHECK(ret == true);
41764176
TEST_CHECK(shapes.size() == 1);
4177-
// Legacy parser preserves spaces: "o MyObject " -> name = " MyObject "
4178-
// (first space consumed by 'o ' directive, rest preserved)
4177+
// Legacy parser uses sr.advance(2) to skip 'o' + one space, then
4178+
// sr.read_line() captures the remainder verbatim. For "o MyObject \n",
4179+
// advance(2) skips 'o' and the first space, leaving " MyObject " as the
4180+
// object name (leading space is the second space from the original input,
4181+
// and trailing spaces are preserved).
41794182
TEST_CHECK(shapes[0].name == " MyObject ");
41804183
}
41814184

0 commit comments

Comments
 (0)