@@ -123,7 +123,7 @@ export function initializeTesting(context: vscode.ExtensionContext): vscode.Test
123
123
/**
124
124
* Reset and recreate the tree of TestItems based on the GNATtest XML.
125
125
*/
126
- async function refreshTestItemTree ( ) {
126
+ export async function refreshTestItemTree ( ) {
127
127
controller . items . replace ( [ ] ) ;
128
128
testData . clear ( ) ;
129
129
await addTestsRootLevel ( ) ;
@@ -142,7 +142,7 @@ async function getGnatTestXmlPath(): Promise<string> {
142
142
*
143
143
* @returns the full path to the GNATtest test driver GPR project.
144
144
*/
145
- async function getGnatTestDriverProjectPath ( ) : Promise < string > {
145
+ export async function getGnatTestDriverProjectPath ( ) : Promise < string > {
146
146
const objDir = await getObjectDir ( ) ;
147
147
const testDriverPath = path . join ( objDir , 'gnattest' , 'harness' , 'test_driver.gpr' ) ;
148
148
return testDriverPath ;
@@ -152,7 +152,7 @@ async function getGnatTestDriverProjectPath(): Promise<string> {
152
152
*
153
153
* @returns the full path to the GNATtest test driver executable.
154
154
*/
155
- async function getGnatTestDriverExecPath ( ) : Promise < string > {
155
+ export async function getGnatTestDriverExecPath ( ) : Promise < string > {
156
156
const objDir = await getObjectDir ( ) ;
157
157
const testDriverPath = path . join ( objDir , 'gnattest' , 'harness' , 'test_runner' + exe ) ;
158
158
return testDriverPath ;
@@ -399,7 +399,7 @@ export function pathIsReadable(p: string): boolean {
399
399
* @param item - the TestItem whose children must be computed, or `undefined` if
400
400
* we should compute the root items of the tree.
401
401
*/
402
- async function resolveHandler (
402
+ export async function resolveHandler (
403
403
item : TestItem | undefined ,
404
404
recursive = false ,
405
405
token ?: CancellationToken
@@ -470,7 +470,7 @@ function configureTestExecution(controller: vscode.TestController) {
470
470
* @param request - the request based on the User selections
471
471
* @param token - a cancellation token
472
472
*/
473
- async function runHandler ( request : vscode . TestRunRequest , token : vscode . CancellationToken ) {
473
+ export async function runHandler ( request : vscode . TestRunRequest , token ? : vscode . CancellationToken ) {
474
474
if ( ( request . include ?. length ?? 0 ) === 0 && ( request . exclude ?. length ?? 0 ) === 0 ) {
475
475
/**
476
476
* Run all tests. This ignores request.exclude which is why we only use
@@ -490,7 +490,7 @@ async function runHandler(request: vscode.TestRunRequest, token: vscode.Cancella
490
490
* controller.items) and request.exclude. It then runs the test driver for each
491
491
* test, using the --routines argument at each run to select a specific test.
492
492
*/
493
- async function handleRunRequestedTests ( request : vscode . TestRunRequest , token : CancellationToken ) {
493
+ async function handleRunRequestedTests ( request : vscode . TestRunRequest , token ? : CancellationToken ) {
494
494
const run = controller . createTestRun ( request , undefined , false ) ;
495
495
try {
496
496
const requestedRootTests = [ ] ;
@@ -580,7 +580,7 @@ function prepareAndAppendOutput(run: vscode.TestRun, out: string) {
580
580
* in {@link handleRunRequestedTests} fails because of GNATtest shortcomings, we
581
581
* still have this approach of running all tests as a backup.
582
582
*/
583
- async function handleRunAll ( request : vscode . TestRunRequest , token : CancellationToken ) {
583
+ async function handleRunAll ( request : vscode . TestRunRequest , token ? : CancellationToken ) {
584
584
const run = controller . createTestRun ( request , undefined , false ) ;
585
585
try {
586
586
/**
@@ -687,7 +687,7 @@ async function buildTestDriver(run: vscode.TestRun) {
687
687
* @param duration - the duration of execution of the test to be reported along
688
688
* with the outcome, if the information is available.
689
689
*/
690
- function determineTestOutcome (
690
+ export function determineTestOutcome (
691
691
test : vscode . TestItem ,
692
692
driverOutput : string ,
693
693
run : vscode . TestRun ,
@@ -763,7 +763,7 @@ function determineTestOutcome(
763
763
* @param token - a cancellation token to stop the traversal
764
764
* @returns the array of leaf TestItems reachable from the given collection.
765
765
*/
766
- function collectLeafsFromCollection (
766
+ export function collectLeafsFromCollection (
767
767
items : vscode . TestItemCollection ,
768
768
token ?: CancellationToken
769
769
) : vscode . TestItem [ ] {
@@ -783,7 +783,7 @@ function collectLeafsFromCollection(
783
783
* @param token - a cancellation token to stop the traversal
784
784
* @returns the array of leaf TestItems reachable from the given TestItem
785
785
*/
786
- function collectLeafItems ( item : TestItem , token ?: CancellationToken ) : vscode . TestItem [ ] {
786
+ export function collectLeafItems ( item : TestItem , token ?: CancellationToken ) : vscode . TestItem [ ] {
787
787
if ( item . children . size > 0 ) {
788
788
const res : vscode . TestItem [ ] = [ ] ;
789
789
item . children . forEach ( ( i ) => {
0 commit comments