diff options
Diffstat (limited to 'tools/slang-test/test-context.cpp')
| -rw-r--r-- | tools/slang-test/test-context.cpp | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/tools/slang-test/test-context.cpp b/tools/slang-test/test-context.cpp index 685ee1f2e..096b16d7c 100644 --- a/tools/slang-test/test-context.cpp +++ b/tools/slang-test/test-context.cpp @@ -16,8 +16,6 @@ thread_local int slangTestThreadIndex = 0; TestContext::TestContext() { - m_session = nullptr; - /// if we are testing on arm, debug, we may want to increase the connection timeout #if (SLANG_PROCESSOR_ARM || SLANG_PROCESSOR_ARM_64) && defined(_DEBUG) // 10 mins(!). This seems to be the order of time needed for timeout on a CI ARM test system on @@ -87,12 +85,7 @@ Result TestContext::init(const char* inExePath) { SlangGlobalSessionDesc desc = {}; desc.enableGLSL = true; - slang_createGlobalSession2(&desc, &m_session); - - if (!m_session) - { - return SLANG_FAIL; - } + slang::createGlobalSession(&desc, m_session.writeRef()); exePath = inExePath; SLANG_RETURN_ON_FAIL(TestToolUtil::getExeDirectoryPath(inExePath, exeDirectoryPath)); SLANG_RETURN_ON_FAIL(TestToolUtil::getDllDirectoryPath(inExePath, dllDirectoryPath)); @@ -110,10 +103,6 @@ TestContext::~TestContext() LanguageServerProtocol::ExitParams::methodName, JSONValue::makeInt(0)); } - if (m_session) - { - spDestroySession(m_session); - } } TestContext::InnerMainFunc TestContext::getInnerMainFunc(const String& dirPath, const String& name) |
