Setup and Configuration

Previous Next Contents

4 Running the TCK

This chapter describes how to use the Debugging Support for Other Languages TCK. This chapter contains the following sections:

Debugging Support for Other Languages TCK Operating Assumptions

The following is assumed:
* J2SE SDK version 1.4 or later is installed on the system hosting the test. * The Product to be tested (which implements Debugging Support for Other Languages 1.0) is installed on the system hosting the test.

4.1 Generating the SMAPs to be Tested

The input to the test is a set of SMAPs. The testing party must generate these SMAPs and they must be generated according to the following procedures. There are two forms of SMAP: an unresolved SMAP in an SMAP file and a resolved SMAP embedded in the SourceDebugExtension attribute of a class file. If unresolved SMAPs are exposed, this SMAP form must be tested. If SMAPs are embedded into class files, this SMAP form (class files containing a resolved SMAP) must be tested. If both forms are exposed, the tests must be repeated with each form.

The Product must be used to create the set of SMAPs to be tested. Generally, the Product is a translator. In this case, a set of test source programs must first be written — see “Generating the SMAPs from Test Source” on page 16. If the Product has more than one input language or more than one output language, the test must be repeated for each combination of input and output langauge. If the Product has no input language, an SMAP for each type of output must be used.

4.1.1 Generating the SMAPs from Test Source

Let us call the input language of the translator LI. A set of test source programs in LI must be written.

The set of test source programs in LI must exercise all control structures in LI, all subroutine invocation mechanisms in LI and all source inclusion mechanisms in LI.. Any of these which do not exist in LI are, of course, excepted.

For each test source program, the Product must be used to generate the output program and its corresponding SMAP. These SMAPs will then be submitted to the TCK test.

4.2 Using the Debugging Support for Other Languages TCK to Test a Product

The following test is applied, one SMAP at a time, to each SMAP generated by the procedures above. The test is executed by launching the Java programming language class VerifySMAP (in dsol-tck.jar) with the SMAP as an argument:

java VerifySMAP -classpath TCK_DIRECTORY/dsol-tck.jar path_to_the_smap

For example, to test an unresolved SMAP file pass it to the test:
java VerifySMAP my.smap For example, to test a class file with an embedded SMAP pass it to the test:
java VerifySMAP my.class

If a test fails an exception will be thrown. If the test of any SMAP fails, the TCK has failed.


Previous Next Contents
Eclipse Foundation Logo  Copyright © 2018, Oracle and/or its affiliates. All rights reserved.