public class ExportModelJUnitTest extends java.lang.Object
To run these tests, use:
cd $PTII ./configure ant test.single -Dtest.name=ptolemy.vergil.basic.export.test.junit.ExportModelJUnitTest -Djunit.formatter=plainor
cd $PTII/ptolemy/vergil/basic/export/test/junit/; export CLASSPATH=${PTII}:${PTII}/lib/junit-4.8.2.jar:${PTII}/lib/JUnitParams-0.3.0.jar${PTII}:${PTII}/lib/junit-4.8.2.jar:${PTII}/lib/JUnitParams-0.3.0.jar; export JAVAFLAGS="-Dptolemy.ptII.exportHTML.linkToJNLP=true -Dptolemy.ptII.exportHTML.usePtWebsite=true" $PTII/bin/ptinvoke org.junit.runner.JUnitCore ptolemy.vergil.basic.export.test.junit.ExportModelJUnitTest
Or, if you want to debug this to find leaks, try removing most of the models from $PTII/ptolemy/configs/doc/models.txt and then running the above exports followed by $PTII/bin/ptjacl and then:
set cmdArgs [java::new {java.lang.String[]} 1 {ptolemy.vergil.basic.export.test.junit.ExportModelJUnitTest}] java::call org.junit.runner.JUnitCore main $cmdArgs
Then a few models will export and leaks can be checked.
This test uses JUnitParams from http://code.google.com/p/junitparams/, which is released under Apache License 2.0.
Constructor and Description |
---|
ExportModelJUnitTest() |
Modifier and Type | Method and Description |
---|---|
protected static int |
_getCount()
Get the number of times RunExportModel has been invoked.
|
protected static void |
_incrementCount()
Increment the count of the number of times RunExportModel has been invoked.
|
java.lang.Object[] |
demos()
Return a two dimensional array of arrays of strings that name the model
to be exported.
|
void |
RunExportModel(java.lang.String modelPath)
Export a model.
|
public ExportModelJUnitTest()
public void RunExportModel(java.lang.String modelPath) throws java.lang.Throwable
modelPath
- The model to be exported. The code is exported to
the directory contained by the model.java.lang.Throwable
- If there is a problem reading or exporting the model.public java.lang.Object[] demos() throws java.io.IOException
java.io.IOException
- If there is a problem accessing the directory.protected static int _getCount()
protected static void _incrementCount()