Search in sources :

Example 1 with ValueTableDialog

use of de.neemann.digital.gui.components.testing.ValueTableDialog in project Digital by hneemann.

the class Main method startTests.

/**
 * starts the tests
 */
public void startTests() {
    try {
        ArrayList<ValueTableDialog.TestSet> tsl = new ArrayList<>();
        for (VisualElement el : circuitComponent.getCircuit().getElements()) if (el.equalsDescription(TestCaseElement.TESTCASEDESCRIPTION))
            tsl.add(new ValueTableDialog.TestSet(el.getElementAttributes().get(TestCaseElement.TESTDATA), el.getElementAttributes().getCleanLabel()));
        if (tsl.isEmpty())
            throw new TestingDataException(Lang.get("err_noTestData"));
        windowPosManager.register("testResult", new ValueTableDialog(Main.this, Lang.get("msg_testResult")).addTestResult(tsl, circuitComponent.getCircuit(), library)).setVisible(true);
        ensureModelIsStopped();
    } catch (NodeException | ElementNotFoundException | PinException | TestingDataException | RuntimeException e1) {
        showErrorWithoutARunningModel(Lang.get("msg_runningTestError"), e1);
    }
}
Also used : ValueTableDialog(de.neemann.digital.gui.components.testing.ValueTableDialog) TestingDataException(de.neemann.digital.testing.TestingDataException) ArrayList(java.util.ArrayList) ElementNotFoundException(de.neemann.digital.draw.library.ElementNotFoundException)

Aggregations

ElementNotFoundException (de.neemann.digital.draw.library.ElementNotFoundException)1 ValueTableDialog (de.neemann.digital.gui.components.testing.ValueTableDialog)1 TestingDataException (de.neemann.digital.testing.TestingDataException)1 ArrayList (java.util.ArrayList)1