Package ptolemy.util.test.junit
Class AutoCGKnownFailedTests
- java.lang.Object
-
- ptolemy.util.test.junit.ModelTests
-
- ptolemy.util.test.junit.AutoCGTests
-
- ptolemy.util.test.junit.AutoCGKnownFailedTests
-
- Direct Known Subclasses:
AutoCGCKnownFailedTests,AutoCGFMIMAKnownFailedTests,AutoCGJavaKnownFailedTests
public class AutoCGKnownFailedTests extends AutoCGTests
Run the Ptolemy model tests in the auto/knownFailedTests/ directory using cg code generation under JUnit.This class provides common facilities used by classes that generate C and Java code.
- Since:
- Ptolemy II 10.0
- Version:
- $Id$
- Author:
- Christopher Brooks
- Pt.AcceptedRating:
- Red (cxh)
- Pt.ProposedRating:
- Red (cxh)
-
-
Field Summary
-
Fields inherited from class ptolemy.util.test.junit.AutoCGTests
_cgDirectory, _generateCodeMethod
-
Fields inherited from class ptolemy.util.test.junit.ModelTests
_applicationClass, _applicationConstructor, _applicationToplevelMethod, THERE_ARE_NO_AUTO_ARCH_TESTS, THERE_ARE_NO_AUTO_TESTS, THERE_ARE_NO_KNOWN_FAILED_TESTS
-
-
Constructor Summary
Constructors Constructor Description AutoCGKnownFailedTests()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object[]modelValues()Return a two dimensional array of arrays of strings that name the model to be executed.voidrunModel(java.lang.String fullPath, java.lang.String language, boolean generateInSubdirectory, boolean inline, int maximumLinesPerBlock, boolean variablesAsArrays, java.lang.String generatorPackageList)Generate, compile and run code for a model known to fail.-
Methods inherited from class ptolemy.util.test.junit.AutoCGTests
setUp
-
Methods inherited from class ptolemy.util.test.junit.ModelTests
modelValues
-
-
-
-
Method Detail
-
modelValues
public java.lang.Object[] modelValues() throws java.io.IOExceptionReturn a two dimensional array of arrays of strings that name the model to be executed. If auto/knownFailedTests/ does not exist, or does not contain files that end with .xml or .moml, return a list with one element that contains a special string.- Overrides:
modelValuesin classModelTests- Returns:
- The List of model names in auto/
- Throws:
java.io.IOException- If there is a problem accessing the auto/ directory.
-
runModel
public void runModel(java.lang.String fullPath, java.lang.String language, boolean generateInSubdirectory, boolean inline, int maximumLinesPerBlock, boolean variablesAsArrays, java.lang.String generatorPackageList) throws java.lang.ThrowableGenerate, compile and run code for a model known to fail.- Overrides:
runModelin classAutoCGTests- Parameters:
fullPath- The full path to the model file to be executed. If the fullPath ends with the value of theModelTests.THERE_ARE_NO_AUTO_TESTS, then the method returns immediately.language- Either "c" or "java".generateInSubdirectory- If true, then generate the code in in a subdirectory of ~/cg/.inline- If true, then generate inline code.maximumLinesPerBlock- The maximum number of line of code generated per blockvariablesAsArrays- If true, then try to save space by putting variables into arrays.generatorPackageList- A semicolon or * separated list of Java packages to be searched for adapters. For example, generic.program.procedural.c.arduino means use the arduino- Throws:
java.lang.Throwable- If thrown while generating, compiling or executing the compiled code.
-
-