Tried making tests less verbose
							parent
							
								
									86e482bb08
								
							
						
					
					
						commit
						47a01b1d90
					
				
							
								
								
									
										14
									
								
								.cproject
								
								
								
								
							
							
						
						
									
										14
									
								
								.cproject
								
								
								
								
							| 
						 | 
				
			
			@ -315,6 +315,14 @@
 | 
			
		|||
<useDefaultCommand>true</useDefaultCommand>
 | 
			
		||||
<runAllBuilders>true</runAllBuilders>
 | 
			
		||||
</target>
 | 
			
		||||
<target name="clean" path="wrap" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
 | 
			
		||||
<buildCommand>make</buildCommand>
 | 
			
		||||
<buildArguments/>
 | 
			
		||||
<buildTarget>clean</buildTarget>
 | 
			
		||||
<stopOnError>true</stopOnError>
 | 
			
		||||
<useDefaultCommand>true</useDefaultCommand>
 | 
			
		||||
<runAllBuilders>true</runAllBuilders>
 | 
			
		||||
</target>
 | 
			
		||||
<target name="check" path="cpp" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
 | 
			
		||||
<buildCommand>make</buildCommand>
 | 
			
		||||
<buildArguments>-k</buildArguments>
 | 
			
		||||
| 
						 | 
				
			
			@ -469,7 +477,6 @@
 | 
			
		|||
</target>
 | 
			
		||||
<target name="testBayesTree.run" path="cpp" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
 | 
			
		||||
<buildCommand>make</buildCommand>
 | 
			
		||||
<buildArguments/>
 | 
			
		||||
<buildTarget>testBayesTree.run</buildTarget>
 | 
			
		||||
<stopOnError>true</stopOnError>
 | 
			
		||||
<useDefaultCommand>false</useDefaultCommand>
 | 
			
		||||
| 
						 | 
				
			
			@ -477,6 +484,7 @@
 | 
			
		|||
</target>
 | 
			
		||||
<target name="testSymbolicBayesNet.run" path="cpp" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
 | 
			
		||||
<buildCommand>make</buildCommand>
 | 
			
		||||
<buildArguments/>
 | 
			
		||||
<buildTarget>testSymbolicBayesNet.run</buildTarget>
 | 
			
		||||
<stopOnError>true</stopOnError>
 | 
			
		||||
<useDefaultCommand>false</useDefaultCommand>
 | 
			
		||||
| 
						 | 
				
			
			@ -484,7 +492,6 @@
 | 
			
		|||
</target>
 | 
			
		||||
<target name="testSymbolicFactorGraph.run" path="cpp" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
 | 
			
		||||
<buildCommand>make</buildCommand>
 | 
			
		||||
<buildArguments/>
 | 
			
		||||
<buildTarget>testSymbolicFactorGraph.run</buildTarget>
 | 
			
		||||
<stopOnError>true</stopOnError>
 | 
			
		||||
<useDefaultCommand>false</useDefaultCommand>
 | 
			
		||||
| 
						 | 
				
			
			@ -676,7 +683,6 @@
 | 
			
		|||
</target>
 | 
			
		||||
<target name="testGraph.run" path="cpp" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
 | 
			
		||||
<buildCommand>make</buildCommand>
 | 
			
		||||
<buildArguments/>
 | 
			
		||||
<buildTarget>testGraph.run</buildTarget>
 | 
			
		||||
<stopOnError>true</stopOnError>
 | 
			
		||||
<useDefaultCommand>false</useDefaultCommand>
 | 
			
		||||
| 
						 | 
				
			
			@ -732,6 +738,7 @@
 | 
			
		|||
</target>
 | 
			
		||||
<target name="testSimulated2D.run" path="cpp" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
 | 
			
		||||
<buildCommand>make</buildCommand>
 | 
			
		||||
<buildArguments/>
 | 
			
		||||
<buildTarget>testSimulated2D.run</buildTarget>
 | 
			
		||||
<stopOnError>true</stopOnError>
 | 
			
		||||
<useDefaultCommand>false</useDefaultCommand>
 | 
			
		||||
| 
						 | 
				
			
			@ -779,7 +786,6 @@
 | 
			
		|||
</target>
 | 
			
		||||
<target name="testErrors.run" path="cpp" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
 | 
			
		||||
<buildCommand>make</buildCommand>
 | 
			
		||||
<buildArguments/>
 | 
			
		||||
<buildTarget>testErrors.run</buildTarget>
 | 
			
		||||
<stopOnError>true</stopOnError>
 | 
			
		||||
<useDefaultCommand>false</useDefaultCommand>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -166,7 +166,8 @@ Module::Module(const string& interfacePath,
 | 
			
		|||
/* ************************************************************************* */
 | 
			
		||||
void Module::matlab_code(const string& toolboxPath, 
 | 
			
		||||
			 const string& nameSpace, 
 | 
			
		||||
			 const string& mexFlags) 
 | 
			
		||||
			 const string& mexFlags,
 | 
			
		||||
			 bool verbose)
 | 
			
		||||
{
 | 
			
		||||
  try {
 | 
			
		||||
    string installCmd = "install -d " + toolboxPath;
 | 
			
		||||
| 
						 | 
				
			
			@ -177,7 +178,7 @@ void Module::matlab_code(const string& toolboxPath,
 | 
			
		|||
    ofstream ofs(makeFile.c_str());
 | 
			
		||||
    if(!ofs) throw CantOpenFile(makeFile);
 | 
			
		||||
 | 
			
		||||
    cerr << "generating " << makeFile << endl;
 | 
			
		||||
    if (verbose) cerr << "generating " << makeFile << endl;
 | 
			
		||||
    emit_header_comment(ofs,"%");
 | 
			
		||||
    ofs << "echo on" << endl << endl;
 | 
			
		||||
    ofs << "toolboxpath = pwd" << endl;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -27,6 +27,7 @@ struct Module {
 | 
			
		|||
   */
 | 
			
		||||
  void matlab_code(const std::string& path, 
 | 
			
		||||
		   const std::string& nameSpace, 
 | 
			
		||||
		   const std::string& mexFlags);
 | 
			
		||||
		   const std::string& mexFlags,
 | 
			
		||||
		   bool verbose);
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -12,6 +12,7 @@
 | 
			
		|||
#include "Module.h"
 | 
			
		||||
 | 
			
		||||
using namespace std;
 | 
			
		||||
static bool verbose = false;
 | 
			
		||||
 | 
			
		||||
/* ************************************************************************* */
 | 
			
		||||
TEST( wrap, ArgumentList ) {
 | 
			
		||||
| 
						 | 
				
			
			@ -62,7 +63,7 @@ TEST( wrap, matlab_code ) {
 | 
			
		|||
 | 
			
		||||
  // emit MATLAB code
 | 
			
		||||
  // make_geometry will not compile, use make testwrap to generate real make
 | 
			
		||||
  module.matlab_code("actual", "", "-O5");
 | 
			
		||||
  module.matlab_code("actual", "", "-O5", verbose);
 | 
			
		||||
 | 
			
		||||
  CHECK(files_equal("expected/@Point2/Point2.m"  , "actual/@Point2/Point2.m"  ));
 | 
			
		||||
  CHECK(files_equal("expected/@Point2/x.cpp"     , "actual/@Point2/x.cpp"     ));
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -25,7 +25,7 @@ void generate_matlab_toolbox(const string& interfacePath,
 | 
			
		|||
  Module module(interfacePath, moduleName);
 | 
			
		||||
 | 
			
		||||
  // emit MATLAB code
 | 
			
		||||
  module.matlab_code(toolboxPath,nameSpace,mexFlags);
 | 
			
		||||
  module.matlab_code(toolboxPath,nameSpace,mexFlags,true);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* ************************************************************************* */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue