mirror of
https://github.com/hneemann/Digital.git
synced 2025-09-12 06:15:32 -04:00
adds description of script based testing to the documentation, closes #412
This commit is contained in:
parent
caa44cf9ff
commit
d20b367095
@ -215,14 +215,22 @@
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="e">
|
||||
<fo:inline font-style="italic"><xsl:apply-templates/></fo:inline>
|
||||
<fo:inline font-style="italic">
|
||||
<xsl:apply-templates/>
|
||||
</fo:inline>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="code">
|
||||
<fo:block font-family="Courier" text-align="left">
|
||||
<xsl:apply-templates/>
|
||||
</fo:block>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="arrow">
|
||||
<fo:inline padding-left="2pt" font-family="ZapfDingbats">→</fo:inline>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="faq" mode="full">
|
||||
<xsl:template match="faq" mode="full">
|
||||
<fo:block keep-together.within-page="always">
|
||||
<fo:block font-weight="bold" margin-top="3mm" margin-bottom="1mm">
|
||||
<xsl:apply-templates select="question"/>
|
||||
|
@ -506,6 +506,34 @@
|
||||
rekursiv weitere Bits hinzugefügt werden, bis die erforderliche Bitzahl des Zählers erreicht ist.
|
||||
</par>
|
||||
</chapter>
|
||||
<chapter heading="Scriptgesteuertes Testen">
|
||||
<par>
|
||||
Wenn Studenten Aufgaben mit Digital erledigen sollen, kann es hilfreich sein, wenn die von den Studenten
|
||||
abgegebenen Schaltungen in einem automatischen Prozess überprüfen zu können.
|
||||
Um diese Überprüfung durchzuführen, kann Digital über die Kommandozeile gestartet werden.
|
||||
Der Aufruf geschieht dabei wie folgt:
|
||||
</par>
|
||||
<par>
|
||||
<code>
|
||||
java -cp Digital.jar de.neemann.digital.testing.CommandLineTester [zu testende Datei] [[optionale Datei
|
||||
mit Testfällen]]
|
||||
</code>
|
||||
</par>
|
||||
<par>
|
||||
Wird nur die zu testende Datei angegegben, werden die Testfälle in dieser Datei ausgeführt.
|
||||
Auf diese Weise können die Testfälle ausgeführt werden, welche die Studenten selbst erstellt haben.
|
||||
</par>
|
||||
<par>
|
||||
Wird ein zweiter Dateiname angegeben, werden die Testfälle aus der zweiten Datei entnommen und die erste
|
||||
Schaltung wird mit diese Testfällen überprüft. Die zweite Datei wird also in der Regel die Musterlösung
|
||||
enthalten, deren Testfälle vollständig und korrekt sind. Die in der zweiten Datei enthaltene Schaltung
|
||||
wird dabei ignoriert. Nur die Testfälle werden daraus entnommen.
|
||||
</par>
|
||||
<par>
|
||||
Um eine abgegebene Schaltung gegen eine Musterlösung testen zu können, müssen die Signalnamen der
|
||||
Ein- und Ausgänge in beiden Schaltungen übereinstimmen.
|
||||
</par>
|
||||
</chapter>
|
||||
<chapter heading="Häufig gestellte Fragen">
|
||||
<faq>
|
||||
<question>Wie kann ich eine Leitung verschieben?</question>
|
||||
|
@ -476,6 +476,33 @@
|
||||
initial circuit until the required number of bits of the counter is reached.
|
||||
</par>
|
||||
</chapter>
|
||||
<chapter heading="Script-controlled testing">
|
||||
<par>
|
||||
If students are to complete exercises with Digital, it can be helpful if the circuits submitted by the
|
||||
students can be checked in an automatic process. To perform this check, Digital can be started
|
||||
from the command line. The call is done as follows:
|
||||
</par>
|
||||
<par>
|
||||
<code>
|
||||
java -cp Digital.jar de.neemann.digital.testing.CommandLineTester [file to test] [[optional file with
|
||||
test cases]]
|
||||
</code>
|
||||
</par>
|
||||
<par>
|
||||
If only the file to be tested is specified, the test cases in that file are executed. In this way, the
|
||||
test cases created by the students themselves can be executed.
|
||||
</par>
|
||||
<par>
|
||||
If a second file name is specified, the test cases are taken from the second file and the first circuit
|
||||
is checked with these test cases. The second file will therefore usually contain the sample solution
|
||||
whose test cases are complete and correct. The circuit contained in the second file is ignored.
|
||||
Only the test cases are taken from it.
|
||||
</par>
|
||||
<par>
|
||||
In order to test a submitted circuit against a sample solution, the signal names of the inputs and
|
||||
outputs in both circuits must match.
|
||||
</par>
|
||||
</chapter>
|
||||
<chapter heading="Frequently asked Questions">
|
||||
<faq>
|
||||
<question>How to move a wire?</question>
|
||||
|
Loading…
x
Reference in New Issue
Block a user