MCPcopy Create free account
hub / github.com/cel-expr/cel-cpp / TestString

Function TestString

internal/strings_test.cc:51–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49}
50
51void TestString(const std::string& unquoted) {
52 TestQuotedString(unquoted, FormatStringLiteral(unquoted));
53 TestQuotedString(unquoted, FormatStringLiteral(absl::Cord(unquoted)));
54 if (unquoted.size() > 1) {
55 const size_t mid = unquoted.size() / 2;
56 TestQuotedString(unquoted, FormatStringLiteral(absl::MakeFragmentedCord(
57 {absl::string_view(unquoted).substr(0, mid),
58 absl::string_view(unquoted).substr(mid)})));
59 }
60 TestQuotedString(unquoted,
61 absl::StrCat("'''", EscapeString(unquoted), "'''"));
62 TestQuotedString(unquoted,
63 absl::StrCat("\"\"\"", EscapeString(unquoted), "\"\"\""));
64}
65
66void TestRawString(const std::string& unquoted) {
67 const std::string quote = (!absl::StrContains(unquoted, "'")) ? "'" : "\"";

Callers 2

TestValueFunction · 0.85
TESTFunction · 0.85

Calls 4

TestQuotedStringFunction · 0.85
FormatStringLiteralFunction · 0.85
EscapeStringFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected