mirror of
https://github.com/hneemann/Digital.git
synced 2025-09-12 14:26:09 -04:00
adds description of script based testing to the documentation, closes #412
This commit is contained in:
parent
caa44cf9ff
commit
d20b367095
@ -215,7 +215,15 @@
|
|||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<xsl:template match="e">
|
<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>
|
||||||
|
|
||||||
<xsl:template match="arrow">
|
<xsl:template match="arrow">
|
||||||
|
@ -506,6 +506,34 @@
|
|||||||
rekursiv weitere Bits hinzugefügt werden, bis die erforderliche Bitzahl des Zählers erreicht ist.
|
rekursiv weitere Bits hinzugefügt werden, bis die erforderliche Bitzahl des Zählers erreicht ist.
|
||||||
</par>
|
</par>
|
||||||
</chapter>
|
</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">
|
<chapter heading="Häufig gestellte Fragen">
|
||||||
<faq>
|
<faq>
|
||||||
<question>Wie kann ich eine Leitung verschieben?</question>
|
<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.
|
initial circuit until the required number of bits of the counter is reached.
|
||||||
</par>
|
</par>
|
||||||
</chapter>
|
</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">
|
<chapter heading="Frequently asked Questions">
|
||||||
<faq>
|
<faq>
|
||||||
<question>How to move a wire?</question>
|
<question>How to move a wire?</question>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user