[mlir-lsp] Add outgoingNotification unit test

Add a unit test exercising `lsp::MessageHanlder::outgoingNotification`.
Split off from pull request #90076, as requested.
This commit is contained in:
Brian Gesiak
2024-04-25 15:30:25 -04:00
parent 8dcb90b083
commit ba1b52e6e7

View File

@@ -118,4 +118,11 @@ TEST_F(TransportInputTest, MethodNotFound) {
EXPECT_THAT(getOutput(), HasSubstr("\"error\""));
EXPECT_THAT(getOutput(), HasSubstr("\"message\":\"method not found: ack\""));
}
TEST_F(TransportInputTest, OutgoingNotification) {
auto notifyFn = getMessageHandler().outgoingNotification<CompletionList>(
"outgoing-notification");
notifyFn(CompletionList{});
EXPECT_THAT(getOutput(), HasSubstr("\"method\":\"outgoing-notification\""));
}
} // namespace