Файли
openidea/e2e/cppNamespaceStyle.spec.ts
T
txdywmwddhxs 2413cc4b43 fix(editor): preserve C++ namespace colors for library symbols (#6133)
clangd marks std and other standard-library namespaces with the defaultLibrary modifier, so the generic builtin (Predefined symbol) class overrode the Namespace colour. A C++ semantic hook drops the builtin class for namespace tokens only; other symbol kinds, modifiers and languages keep their styling.

Fixes #6123

Co-authored-by: txdywmwddhxs <[email protected]>
2026-11-26 18:02:58 +08:00

13 рядки
521 B
TypeScript

import { expect, test } from "@playwright/test";
for (const mode of ["dark", "light"]) {
test(`C++ standard and user namespaces share the namespace colour (${mode})`, async ({ page }) => {
await page.goto(`/e2e/cppNamespaceStyle.html${mode === "light" ? "?light" : ""}`);
const namespaces = page.locator(".cm-sem-namespace");
await expect(namespaces).toHaveCount(2);
for (const namespace of await namespaces.all()) {
await expect(namespace).toHaveCSS("color", "rgb(68, 102, 136)");
}
});
}