From f3a039e70f92681c2d7e8bc42229ce8ab96ba4ad Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sat, 6 Dec 2025 22:55:28 -0600 Subject: [PATCH] cover --- tests/unit_tests/test_cpp_generator.py | 6 ++++++ 1 file changed, 6 insertions(+) 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):