diff --git a/tests/unit_tests/test_cpp_generator.py b/tests/unit_tests/test_cpp_generator.py index 2c9f760c8ec..428e7626a16 100644 --- a/tests/unit_tests/test_cpp_generator.py +++ b/tests/unit_tests/test_cpp_generator.py @@ -248,6 +248,12 @@ class TestLiterals: (cg.FloatLiteral(4.2), "4.2f"), (cg.FloatLiteral(1.23456789), "1.23456789f"), (cg.FloatLiteral(math.nan), "NAN"), + (cg.StringRefLiteral("foo"), 'StringRef::from_lit("foo")'), + (cg.StringRefLiteral(""), 'StringRef::from_lit("")'), + ( + cg.StringRefLiteral('with "quotes"'), + 'StringRef::from_lit("with \\042quotes\\042")', + ), ), ) def test_str__simple(self, target: cg.Literal, expected: str):