@@ -123,7 +123,7 @@ export function initializeTesting(context: vscode.ExtensionContext): vscode.Test
123123/**
124124 * Reset and recreate the tree of TestItems based on the GNATtest XML.
125125 */
126- async function refreshTestItemTree ( ) {
126+ export async function refreshTestItemTree ( ) {
127127 controller . items . replace ( [ ] ) ;
128128 testData . clear ( ) ;
129129 await addTestsRootLevel ( ) ;
@@ -142,7 +142,7 @@ async function getGnatTestXmlPath(): Promise<string> {
142142 *
143143 * @returns the full path to the GNATtest test driver GPR project.
144144 */
145- async function getGnatTestDriverProjectPath ( ) : Promise < string > {
145+ export async function getGnatTestDriverProjectPath ( ) : Promise < string > {
146146 const objDir = await getObjectDir ( ) ;
147147 const testDriverPath = path . join ( objDir , 'gnattest' , 'harness' , 'test_driver.gpr' ) ;
148148 return testDriverPath ;
@@ -152,7 +152,7 @@ async function getGnatTestDriverProjectPath(): Promise<string> {
152152 *
153153 * @returns the full path to the GNATtest test driver executable.
154154 */
155- async function getGnatTestDriverExecPath ( ) : Promise < string > {
155+ export async function getGnatTestDriverExecPath ( ) : Promise < string > {
156156 const objDir = await getObjectDir ( ) ;
157157 const testDriverPath = path . join ( objDir , 'gnattest' , 'harness' , 'test_runner' + exe ) ;
158158 return testDriverPath ;
@@ -399,7 +399,7 @@ export function pathIsReadable(p: string): boolean {
399399 * @param item - the TestItem whose children must be computed, or `undefined` if
400400 * we should compute the root items of the tree.
401401 */
402- async function resolveHandler (
402+ export async function resolveHandler (
403403 item : TestItem | undefined ,
404404 recursive = false ,
405405 token ?: CancellationToken
@@ -470,7 +470,7 @@ function configureTestExecution(controller: vscode.TestController) {
470470 * @param request - the request based on the User selections
471471 * @param token - a cancellation token
472472 */
473- async function runHandler ( request : vscode . TestRunRequest , token : vscode . CancellationToken ) {
473+ export async function runHandler ( request : vscode . TestRunRequest , token ? : vscode . CancellationToken ) {
474474 if ( ( request . include ?. length ?? 0 ) === 0 && ( request . exclude ?. length ?? 0 ) === 0 ) {
475475 /**
476476 * 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
490490 * controller.items) and request.exclude. It then runs the test driver for each
491491 * test, using the --routines argument at each run to select a specific test.
492492 */
493- async function handleRunRequestedTests ( request : vscode . TestRunRequest , token : CancellationToken ) {
493+ async function handleRunRequestedTests ( request : vscode . TestRunRequest , token ? : CancellationToken ) {
494494 const run = controller . createTestRun ( request , undefined , false ) ;
495495 try {
496496 const requestedRootTests = [ ] ;
@@ -580,7 +580,7 @@ function prepareAndAppendOutput(run: vscode.TestRun, out: string) {
580580 * in {@link handleRunRequestedTests} fails because of GNATtest shortcomings, we
581581 * still have this approach of running all tests as a backup.
582582 */
583- async function handleRunAll ( request : vscode . TestRunRequest , token : CancellationToken ) {
583+ async function handleRunAll ( request : vscode . TestRunRequest , token ? : CancellationToken ) {
584584 const run = controller . createTestRun ( request , undefined , false ) ;
585585 try {
586586 /**
@@ -687,7 +687,7 @@ async function buildTestDriver(run: vscode.TestRun) {
687687 * @param duration - the duration of execution of the test to be reported along
688688 * with the outcome, if the information is available.
689689 */
690- function determineTestOutcome (
690+ export function determineTestOutcome (
691691 test : vscode . TestItem ,
692692 driverOutput : string ,
693693 run : vscode . TestRun ,
@@ -763,7 +763,7 @@ function determineTestOutcome(
763763 * @param token - a cancellation token to stop the traversal
764764 * @returns the array of leaf TestItems reachable from the given collection.
765765 */
766- function collectLeafsFromCollection (
766+ export function collectLeafsFromCollection (
767767 items : vscode . TestItemCollection ,
768768 token ?: CancellationToken
769769) : vscode . TestItem [ ] {
@@ -783,7 +783,7 @@ function collectLeafsFromCollection(
783783 * @param token - a cancellation token to stop the traversal
784784 * @returns the array of leaf TestItems reachable from the given TestItem
785785 */
786- function collectLeafItems ( item : TestItem , token ?: CancellationToken ) : vscode . TestItem [ ] {
786+ export function collectLeafItems ( item : TestItem , token ?: CancellationToken ) : vscode . TestItem [ ] {
787787 if ( item . children . size > 0 ) {
788788 const res : vscode . TestItem [ ] = [ ] ;
789789 item . children . forEach ( ( i ) => {
0 commit comments