mirror of
https://github.com/esphome/esphome.git
synced 2026-09-19 11:08:38 +00:00
cover
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user