一次性重排,无任何行为改动。四个目录各自的 .clang-format 放在仓库里已久,但全组织只有 MSIME-Linux 在 CI 里执行 clang-format 检查,这边 149 个文件里有 149 个不符合自己声明的风格。 已逐文件核对语义等价:去掉空白、注释与相邻字符串字面量拆分之后,全部 149 个文件与重排前逐字节 相同。差异只有三类——缩进与换行、clang-format 补的 } // namespace 结尾注释、以及长字符串被拆成 相邻字面量(C++ 保证自动拼接)。 这个提交会写进 .git-blame-ignore-revs。
25 lines
989 B
C++
25 lines
989 B
C++
#include "tests/includes/test_framework.h"
|
|
#include "webview2/candidate_window_template.h"
|
|
|
|
TEST_CASE(candidate_window_template_renders_ninth_candidate)
|
|
{
|
|
const std::wstring templ = L"<!--0Anchor-->{0}<!--1Anchor-->{1}<!--8Anchor-->{8}<!--9Anchor-->{9}";
|
|
const std::wstring text = L"preedit,one,two,three,four,five,six,seven,eight,nine";
|
|
|
|
const std::wstring result = InflateCandidateTemplate(templ, text);
|
|
|
|
REQUIRE(result.find(L"nine") != std::wstring::npos);
|
|
REQUIRE(result.find(L"<!--9Anchor-->") != std::wstring::npos);
|
|
}
|
|
|
|
TEST_CASE(candidate_window_template_trims_after_eighth_candidate)
|
|
{
|
|
const std::wstring templ = L"<!--0Anchor-->{0}<!--1Anchor-->{1}<!--8Anchor-->{8}<!--9Anchor-->{9}";
|
|
const std::wstring text = L"preedit,one,two,three,four,five,six,seven,eight";
|
|
|
|
const std::wstring result = InflateCandidateTemplate(templ, text);
|
|
|
|
REQUIRE(result.find(L"eight") != std::wstring::npos);
|
|
REQUIRE(result.find(L"{9}") == std::wstring::npos);
|
|
}
|