diff --git a/test/testtokenize.cpp b/test/testtokenize.cpp index 0dd2f654f1b..3878435239a 100644 --- a/test/testtokenize.cpp +++ b/test/testtokenize.cpp @@ -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 @@ -8492,6 +8493,12 @@ class TestTokenizer : public TestFixture { ASSERT_NO_THROW(tokenizeAndStringify(code)); } + void stringviewLiteral() { // #13234 + const char code[] = "auto sv2 = \"test\"sv;"; + ASSERT_NO_THROW(tokenizeAndStringify(code)); + ignore_errout(); + } + void atomicCast() { // #12605 const char code[] = "int atomic_add_int(int *ptr, int v)\n" "{\n"