Skip to content

Commit 1083d4e

Browse files
committed
drop unnecessary ?., and use sensible names for test framework in tests.
1 parent 5fe5353 commit 1083d4e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Extension/src/LanguageServer/lmTool.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ export class CppConfigurationLanguageModelTool implements vscode.LanguageModelTo
168168
contextString += `The project targets the ${chatContext.targetArchitecture} architecture. `;
169169
telemetryProperties["targetArchitecture"] = chatContext.targetArchitecture;
170170
}
171-
if (chatContext.usedTestFrameworks?.length > 0) {
171+
if (chatContext.usedTestFrameworks.length > 0) {
172172
contextString += `The project uses the following C++ test frameworks: ${chatContext.usedTestFrameworks.join(', ')}. `;
173173
telemetryProperties["testFrameworks"] = chatContext.usedTestFrameworks.join(', ');
174174
}

Extension/test/scenarios/SingleRootProject/tests/lmTool.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ describe('CppConfigurationLanguageModelTool Tests', () => {
146146
compiler: 'msvc',
147147
targetPlatform: 'windows',
148148
targetArchitecture: 'x64',
149-
usedTestFrameworks: ['gtest', 'catch2']
149+
usedTestFrameworks: ['GTest', 'Catch2']
150150
}
151151
});
152152

@@ -159,12 +159,12 @@ describe('CppConfigurationLanguageModelTool Tests', () => {
159159
"standardVersion": 'C++20',
160160
"targetPlatform": 'Windows',
161161
"targetArchitecture": 'x64',
162-
'testFrameworks': 'gtest, catch2'
162+
'testFrameworks': 'GTest, Catch2'
163163
})));
164164
ok(result, 'result should not be undefined');
165165
const text = result.content[0] as vscode.LanguageModelTextPart;
166166
ok(text, 'result should contain a text part');
167-
const traits_text = `The user is working on a C++ project. The project uses language version C++20. The project compiles using the MSVC compiler. The project targets the Windows platform. The project targets the x64 architecture. The project uses the following C++ test frameworks: gtest, catch2. `;
167+
const traits_text = `The user is working on a C++ project. The project uses language version C++20. The project compiles using the MSVC compiler. The project targets the Windows platform. The project targets the x64 architecture. The project uses the following C++ test frameworks: GTest, Catch2. `;
168168
ok(text.value === traits_text);
169169
});
170170

0 commit comments

Comments
 (0)