MCPcopy Create free account
hub / github.com/IChooseYou/Reclass / testCommandRowRootNameSpan

Method testCommandRowRootNameSpan

tests/test_compose.cpp:1969–1978  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1967 }
1968
1969 void testCommandRowRootNameSpan() {
1970 // Name span should cover the class name in the merged command row
1971 QString text = "source\u25BE \u00B7 0x0 \u00B7 struct\u25BE MyClass {";
1972 ColumnSpan nameSpan = commandRowRootNameSpan(text);
1973 QVERIFY(nameSpan.valid);
1974
1975 QString nameText = text.mid(nameSpan.start, nameSpan.end - nameSpan.start);
1976 QVERIFY2(nameText.trimmed() == "MyClass",
1977 qPrintable("Name span should be 'MyClass', got: '" + nameText.trimmed() + "'"));
1978 }
1979
1980 void testTextIsNonEmpty() {
1981 // Verify composed text is actually generated (not empty)

Callers

nothing calls this directly

Calls 1

commandRowRootNameSpanFunction · 0.85

Tested by

no test coverage detected