Skip to content

add test for #13234 #7544

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions test/testtokenize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,7 @@ class TestTokenizer : public TestFixture {
TEST_CASE(genericInIf); // #13561

TEST_CASE(preincrementInLambda); // #13312
TEST_CASE(stringviewLiteral); // #13234

TEST_CASE(atomicCast); // #12605
TEST_CASE(constFunctionPtrTypedef); // #12135
Expand Down Expand Up @@ -8492,6 +8493,12 @@ class TestTokenizer : public TestFixture {
ASSERT_NO_THROW(tokenizeAndStringify(code));
}

void stringviewLiteral() { // #13234
const char code[] = "auto sv2 = \"test\"sv;";
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I fear this does not match the test code in the ticket. I fear the user included string_view and that his header is needed to reproduce the syntax error.

ASSERT_NO_THROW(tokenizeAndStringify(code));
ignore_errout();
}

void atomicCast() { // #12605
const char code[] = "int atomic_add_int(int *ptr, int v)\n"
"{\n"
Expand Down
Loading