🐛 fix: support LSP request id variants
This commit is contained in:
@@ -403,7 +403,7 @@ namespace lsp::test
|
||||
TestResult result;
|
||||
result.passed = true;
|
||||
|
||||
std::variant<int, std::string> id = 123;
|
||||
protocol::RequestId id = static_cast<protocol::integer>(123);
|
||||
std::string id_str = transform::debug::GetIdString(id);
|
||||
assertEqual(std::string("123"), id_str, "int id应该转换为'123'");
|
||||
|
||||
@@ -416,7 +416,7 @@ namespace lsp::test
|
||||
TestResult result;
|
||||
result.passed = true;
|
||||
|
||||
std::variant<int, std::string> id = std::string("abc-123-def");
|
||||
protocol::RequestId id = std::string("abc-123-def");
|
||||
std::string id_str = transform::debug::GetIdString(id);
|
||||
assertEqual(std::string("abc-123-def"), id_str, "string id应该保持为'abc-123-def'");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user