summaryrefslogtreecommitdiffstats
path: root/tools/slang-test/test-context.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2022-06-30 14:19:39 -0700
committerGitHub <noreply@github.com>2022-06-30 14:19:39 -0700
commit2c09275388d4c88ea26bf709132b8be4a9e342bc (patch)
treeac0049c3bc484aca9e36b489337771e90973bf0a /tools/slang-test/test-context.cpp
parent5eee6b03c391d0bb6ed0ded2d8d91c2e525fdb97 (diff)
Language server: extract documentation from ordinary comments (#2308)
* Language server: improved documentation formatting. * Extend doc extractor to search in ordinary comments. Reuse language server instance between tests. * Fix test case. * Fix comment. * Fix crash. * Fix enum case doc extraction. * Doc extractor fixes. * Fix. * Fix. Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'tools/slang-test/test-context.cpp')
-rw-r--r--tools/slang-test/test-context.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/slang-test/test-context.cpp b/tools/slang-test/test-context.cpp
index 6bf7406e6..df472d11d 100644
--- a/tools/slang-test/test-context.cpp
+++ b/tools/slang-test/test-context.cpp
@@ -6,6 +6,7 @@
#include "../../source/core/slang-shared-library.h"
#include "../../source/core/slang-test-tool-util.h"
+#include "../../source/compiler-core/slang-language-server-protocol.h"
#include <stdio.h>
#include <stdlib.h>
@@ -71,6 +72,12 @@ Result TestContext::init(const char* exePath)
TestContext::~TestContext()
{
+ if (m_languageServerConnection)
+ {
+ m_languageServerConnection->sendCall(
+ LanguageServerProtocol::ExitParams::methodName,
+ JSONValue::makeInt(0));
+ }
if (m_session)
{
spDestroySession(m_session);