[openrtm-commit:00696] r259 - in trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python: META-INF resource resource/100/Doc/authorLong src/jp/go/aist/rtm/rtcbuilder/python/manager test/jp/go/aist/rtm/rtcbuilder/python/_test test/jp/go/aist/rtm/rtcbuilder/python/_test/_100
openrtm @ openrtm.org
openrtm @ openrtm.org
2012年 2月 11日 (土) 01:57:54 JST
Author: sakamoto
Date: 2012-02-11 01:57:54 +0900 (Sat, 11 Feb 2012)
New Revision: 259
Removed:
trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/resource/Python/
trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/AISTTest.java
trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/AllTestsPy.java
trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/BaseTest.java
trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/ConfigSetTest.java
trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/DiffTest.java
trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/LuckTest.java
trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/MultiTest.java
trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/PyDocLongTest.java
trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/PyDocTest.java
trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/PyExCxtTest.java
trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/PyImplTest.java
trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/PySystemConfigTest.java
trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/PyVariableTest.java
trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/VarTest.java
Modified:
trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/META-INF/MANIFEST.MF
trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/resource/100/Doc/authorLong/MyService_idl_example.py
trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/resource/100/Doc/authorLong/foo.py
trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/src/jp/go/aist/rtm/rtcbuilder/python/manager/PythonGenerateManager.java
trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/_100/AISTTest.java
trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/_100/BaseTest.java
trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/_100/BuildTest.java
trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/_100/ConfigSetTest.java
trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/_100/PyDocTest.java
trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/_100/PyIDLInheritTest.java
trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/_100/PyIDLType.java
trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/_100/PyImplTest.java
trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/_100/PyModuleTest.java
Log:
Update CMakeList.txt #2300
Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/META-INF/MANIFEST.MF
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/META-INF/MANIFEST.MF 2012-02-07 14:48:47 UTC (rev 258)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/META-INF/MANIFEST.MF 2012-02-10 16:57:54 UTC (rev 259)
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: jp.go.aist.rtm.rtcbuilder.python;singleton:=true
-Bundle-Version: 1.1.0.rc2v20110725
+Bundle-Version: 1.1.0.rc3v20120211
Bundle-Activator: jp.go.aist.rtm.rtcbuilder.python.RtcBuilderPythonPlugin
Bundle-Localization: plugin
Require-Bundle: org.eclipse.ui,
Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/resource/100/Doc/authorLong/MyService_idl_example.py
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/resource/100/Doc/authorLong/MyService_idl_example.py 2012-02-07 14:48:47 UTC (rev 258)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/resource/100/Doc/authorLong/MyService_idl_example.py 2012-02-10 16:57:54 UTC (rev 259)
@@ -1,49 +1,38 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# -*- Python -*-
-
"""
\file MyService_idl_examplefile.py
\brief Python example implementations generated from MyService.idl
\date $Date$
-
- \author Noriaki Ando <n-ando at aist.go.jp>345678941234567895123456789612345678971
- 23456789812345
-
+ \author Noriaki Ando
+ <n-ando at aist.go.jp>3456789412345678951234567896123456789712345678981234
+ 5
"""
-
import omniORB
from omniORB import CORBA, PortableServer
-
import _GlobalIDL, _GlobalIDL__POA
-
-
class MyService_i (_GlobalIDL__POA.MyService):
"""
\class MyService_i
Example class implementing IDL interface MyService
"""
-
def __init__(self):
"""
\brief standard constructor
Initialise member variables here
"""
pass
-
# void setGain(in float gain)
def setGain(self, gain):
raise CORBA.NO_IMPLEMENT(0, CORBA.COMPLETED_NO)
# *** Implement me
# Must return: None
-
# float getGain()
def getGain(self):
raise CORBA.NO_IMPLEMENT(0, CORBA.COMPLETED_NO)
# *** Implement me
# Must return: result
-
-
if __name__ == "__main__":
import sys
@@ -52,22 +41,16 @@
# As an example, we activate an object in the Root POA
poa = orb.resolve_initial_references("RootPOA")
-
# Create an instance of a servant class
servant = MyService_i()
-
# Activate it in the Root POA
poa.activate_object(servant)
-
# Get the object reference to the object
objref = servant._this()
# Print a stringified IOR for it
print orb.object_to_string(objref)
-
# Activate the Root POA's manager
poa._get_the_POAManager().activate()
-
# Run the ORB, blocking this thread
orb.run()
-
Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/resource/100/Doc/authorLong/foo.py
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/resource/100/Doc/authorLong/foo.py 2012-02-07 14:48:47 UTC (rev 258)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/resource/100/Doc/authorLong/foo.py 2012-02-10 16:57:54 UTC (rev 259)
@@ -5,8 +5,9 @@
\file foo.py
\brief MDesc
\date $Date$
- \author Noriaki Ando <n-ando at aist.go.jp>345678941234567895123456789612345678971
- 23456789812345
+ \author Noriaki Ando
+ <n-ando at aist.go.jp>3456789412345678951234567896123456789712345678981234
+ 5
"""
import sys
import time
@@ -271,13 +272,10 @@
manager.registerFactory(profile,
foo,
OpenRTM_aist.Delete)
-
def MyModuleInit(manager):
fooInit(manager)
-
# Create a component
comp = manager.createComponent("foo")
-
def main():
mgr = OpenRTM_aist.Manager.init(sys.argv)
mgr.setModuleInitProc(MyModuleInit)
Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/src/jp/go/aist/rtm/rtcbuilder/python/manager/PythonGenerateManager.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/src/jp/go/aist/rtm/rtcbuilder/python/manager/PythonGenerateManager.java 2012-02-07 14:48:47 UTC (rev 258)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/src/jp/go/aist/rtm/rtcbuilder/python/manager/PythonGenerateManager.java 2012-02-10 16:57:54 UTC (rev 259)
@@ -91,9 +91,6 @@
contextMap.put("pyConv", new PythonConverter());
contextMap.put("allIdlFileParam", allIdlFileParams);
- if (rtcParam.getRtmVersion().equals(RTM_VERSION_042)) {
- return generateTemplateCode04(contextMap);
- }
return generateTemplateCode10(contextMap);
}
@@ -126,41 +123,6 @@
return result;
}
- // RTM 0.4系
- @SuppressWarnings("unchecked")
- public List<GeneratedResult> generateTemplateCode04(
- Map<String, Object> contextMap) {
- List<GeneratedResult> result = new ArrayList<GeneratedResult>();
- RtcParam rtcParam = (RtcParam) contextMap.get("rtcParam");
- List<IdlFileParam> allIdlFileParams = (List<IdlFileParam>) contextMap
- .get("allIdlFileParam");
-
- GeneratedResult gr;
- gr = generatePythonSource_04(contextMap);
- result.add(gr);
-
- for (IdlFileParam idl : allIdlFileParams) {
- contextMap.put("idlFileParam", idl);
- gr = generateSVCIDLSource(contextMap);
- result.add(gr);
- }
- if (allIdlFileParams.size() > 0) {
- contextMap.put("idlFileParams", allIdlFileParams);
- gr = generateGlobalInitSource_04(contextMap);
- result.add(gr);
- gr = generateGlobalPOAInitSource_04(contextMap);
- result.add(gr);
- }
-
- for (IdlFileParam idl : rtcParam.getProviderIdlPathes()) {
- contextMap.put("idlFileParam", idl);
- gr = generateSVCIDLExampleSource_04(contextMap);
- result.add(gr);
- }
-
- return result;
- }
-
// 1.0系 (Python)
public GeneratedResult generatePythonSource(Map<String, Object> contextMap) {
@@ -186,38 +148,6 @@
return generate(infile, outfile, contextMap);
}
- // 0.4系 (Python)
-
- public GeneratedResult generatePythonSource_04(
- Map<String, Object> contextMap) {
- RtcParam rtcParam = (RtcParam) contextMap.get("rtcParam");
- String outfile = rtcParam.getName() + ".py";
- String infile = "python_04/Py_RTC.py.vsl";
- return generate(infile, outfile, contextMap);
- }
-
- public GeneratedResult generateSVCIDLExampleSource_04(
- Map<String, Object> contextMap) {
- IdlFileParam idlParam = (IdlFileParam) contextMap.get("idlFileParam");
- String outfile = idlParam.getIdlFileNoExt() + "_idl_example.py";
- String infile = "python_04/Py_SVC_idl_example.py.vsl";
- return generate(infile, outfile, contextMap);
- }
-
- public GeneratedResult generateGlobalInitSource_04(
- Map<String, Object> contextMap) {
- String outfile = "_GlobalIDL/__init__.py";
- String infile = "python_04/Py_Global__init__.py.vsl";
- return generate(infile, outfile, contextMap);
- }
-
- public GeneratedResult generateGlobalPOAInitSource_04(
- Map<String, Object> contextMap) {
- String outfile = "_GlobalIDL__POA/__init__.py";
- String infile = "python_04/Py_Global_POA__init__.py.vsl";
- return generate(infile, outfile, contextMap);
- }
-
// 1.0系 (ビルド環境)
public GeneratedResult generateIDLCompileBat(Map<String, Object> contextMap) {
Deleted: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/AISTTest.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/AISTTest.java 2012-02-07 14:48:47 UTC (rev 258)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/AISTTest.java 2012-02-10 16:57:54 UTC (rev 259)
@@ -1,369 +0,0 @@
-package jp.go.aist.rtm.rtcbuilder.python._test;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import jp.go.aist.rtm.rtcbuilder.Generator;
-import jp.go.aist.rtm.rtcbuilder.generator.GeneratedResult;
-import jp.go.aist.rtm.rtcbuilder.generator.param.DataPortParam;
-import jp.go.aist.rtm.rtcbuilder.generator.param.GeneratorParam;
-import jp.go.aist.rtm.rtcbuilder.generator.param.RtcParam;
-import jp.go.aist.rtm.rtcbuilder.generator.param.ServicePortInterfaceParam;
-import jp.go.aist.rtm.rtcbuilder.generator.param.ServicePortParam;
-import jp.go.aist.rtm.rtcbuilder.manager.GenerateManager;
-import jp.go.aist.rtm.rtcbuilder.python.IRtcBuilderConstantsPython;
-import jp.go.aist.rtm.rtcbuilder.python.manager.PythonGenerateManager;
-
-public class AISTTest extends TestBase {
-
- protected void setUp() throws Exception {
- }
-
- public void testAIST6() throws Exception{
- GeneratorParam genParam = new GeneratorParam();
- RtcParam rtcParam = new RtcParam(genParam, true);
- rtcParam.setOutputProject(rootPath + "\\resource\\work");
- rtcParam.setLanguage(IRtcBuilderConstantsPython.LANG_PYTHON);
- rtcParam.setLanguageArg(IRtcBuilderConstantsPython.LANG_PYTHON_ARG);
- rtcParam.setName("test");
- rtcParam.setDescription("test component");
- rtcParam.setVersion("1.0.0");
- rtcParam.setVender("S.Kurihara");
- rtcParam.setCategory("sample");
- rtcParam.setComponentType("STATIC");
- rtcParam.setActivityType("PERIODIC");
- rtcParam.setMaxInstance(1);
- rtcParam.setRtmVersion("0.4.2");
-
-// genParam.addProviderIDLPath(rootPath + "resource\\Python\\AIST6\\work\\MyService.idl");
-// genParam.addProviderIDLPath(rootPath + "resource\\Python\\AIST6\\work\\MyServiceAIST.idl");
-// genParam.getRtcParams().add(rtcParam);
-// List<ServiceReferenceParam> srvproport = new ArrayList<ServiceReferenceParam>();
-// srvproport.add(new ServiceReferenceParam("MySVPro0","myservice0","MyService", rtcParam));
-// srvproport.add(new ServiceReferenceParam("MySVPro1","myservice","MyService2", rtcParam));
-// rtcParam.setProviderReferences(srvproport);
-// rtcParam.setOriginalConsumerIdls(new ArrayList<String>(genParam.getConsumerIDLPathParams()));
-// rtcParam.setOriginalProviderIdls(new ArrayList<String>(genParam.getProviderIDLPathParams()));
-
- ServicePortParam service1 = new ServicePortParam("MySVPro0",0);
- List<ServicePortInterfaceParam> srvinterts = new ArrayList<ServicePortInterfaceParam>();
- ServicePortInterfaceParam int1 = new ServicePortInterfaceParam(service1, "myservice0", "", "",
- rootPath + "resource\\Python\\AIST6\\work\\MyService.idl", "MyService", "", 0);
- srvinterts.add(int1);
- service1.getServicePortInterfaces().addAll(srvinterts);
- List<ServicePortParam> srvports = new ArrayList<ServicePortParam>();
- srvports.add(service1);
-
- ServicePortParam service2 = new ServicePortParam("MySVPro1",0);
- List<ServicePortInterfaceParam> srvinterts2 = new ArrayList<ServicePortInterfaceParam>();
- ServicePortInterfaceParam int2 = new ServicePortInterfaceParam(service1, "myservice", "", "",
- rootPath + "resource\\Python\\AIST6\\work\\MyServiceAIST.idl", "MyService2", "", 0);
- srvinterts2.add(int2);
- service2.getServicePortInterfaces().addAll(srvinterts2);
- srvports.add(service2);
- rtcParam.getServicePorts().addAll(srvports);
- genParam.getRtcParams().add(rtcParam);
-
- Generator generator = new Generator();
- List<GeneratedResult> result = generator.generateTemplateCode(genParam);
- //
- genParam = new GeneratorParam();
-// rtcParam.getProviderReferences().clear();
-// rtcParam.getConsumerReferences().clear();
- rtcParam.setOutputProject(rootPath + "\\resource\\work");
- rtcParam.getServicePorts().clear();
- genParam.getRtcParams().add(rtcParam);
- generator = new Generator();
- GenerateManager manager = new PythonGenerateManager();
- generator.addGenerateManager(manager);
- result = generator.generateTemplateCode(genParam);
-
- String resourceDir = rootPath + "\\resource\\Python\\AIST6\\";
-
- checkCode(result, resourceDir, "test.py");
- checkCode(result, resourceDir, "README.test");
- }
-
- public void testAIST4() throws Exception{
- GeneratorParam genParam = new GeneratorParam();
- RtcParam rtcParam = new RtcParam(genParam, true);
- rtcParam.setOutputProject(rootPath + "\\resource\\work");
- rtcParam.setLanguage(IRtcBuilderConstantsPython.LANG_PYTHON);
- rtcParam.setLanguageArg(IRtcBuilderConstantsPython.LANG_PYTHON_ARG);
- rtcParam.setName("test");
- rtcParam.setDescription("test component");
- rtcParam.setVersion("1.0.0");
- rtcParam.setVender("S.Kurihara");
- rtcParam.setCategory("sample");
- rtcParam.setComponentType("STATIC");
- rtcParam.setActivityType("PERIODIC");
- rtcParam.setMaxInstance(1);
- rtcParam.setRtmVersion("0.4.2");
-
- ServicePortParam service1 = new ServicePortParam("MySVPro0",0);
- List<ServicePortInterfaceParam> srvinterts = new ArrayList<ServicePortInterfaceParam>();
- ServicePortInterfaceParam int1 = new ServicePortInterfaceParam(service1, "myservice0", "", "",
- rootPath + "resource\\Python\\AIST4\\MyService.idl", "MyService", "", 0);
- srvinterts.add(int1);
- service1.getServicePortInterfaces().addAll(srvinterts);
- List<ServicePortParam> srvports = new ArrayList<ServicePortParam>();
- srvports.add(service1);
-
- ServicePortParam service2 = new ServicePortParam("MySVPro1",0);
- List<ServicePortInterfaceParam> srvinterts2 = new ArrayList<ServicePortInterfaceParam>();
- ServicePortInterfaceParam int2 = new ServicePortInterfaceParam(service1, "myservice", "", "",
- rootPath + "resource\\Python\\AIST4\\MyService.idl", "MyService", "", 0);
- srvinterts2.add(int2);
- service2.getServicePortInterfaces().addAll(srvinterts2);
- srvports.add(service2);
- rtcParam.getServicePorts().addAll(srvports);
- genParam.getRtcParams().add(rtcParam);
-
- Generator generator = new Generator();
- GenerateManager manager = new PythonGenerateManager();
- generator.addGenerateManager(manager);
- List<GeneratedResult> result = generator.generateTemplateCode(genParam);
-
- String resourceDir = rootPath + "\\resource\\Python\\AIST4\\";
-
- checkCode(result, resourceDir, "test.py");
- checkCode(result, resourceDir, "_GlobalIDL/__init__.py");
- checkCode(result, resourceDir, "_GlobalIDL__POA/__init__.py");
- checkCode(result, resourceDir, "MyService_idl_example.py");
- checkCode(result, resourceDir, "README.test");
- checkCode(result, resourceDir, "MyService_idl.py");
- }
-
- public void testAIST3() throws Exception{
- GeneratorParam genParam = new GeneratorParam();
- RtcParam rtcParam = new RtcParam(genParam, true);
- rtcParam.setOutputProject(rootPath + "\\resource\\work");
- rtcParam.setLanguage(IRtcBuilderConstantsPython.LANG_PYTHON);
- rtcParam.setLanguageArg(IRtcBuilderConstantsPython.LANG_PYTHON_ARG);
- rtcParam.setName("test");
- rtcParam.setDescription("test component");
- rtcParam.setVersion("1.0.0");
- rtcParam.setVender("S.Kurihara");
- rtcParam.setCategory("example");
- rtcParam.setComponentType("STATIC");
- rtcParam.setActivityType("PERIODIC");
- rtcParam.setMaxInstance(1);
- rtcParam.setRtmVersion("0.4.2");
-
- List<DataPortParam> dataport = new ArrayList<DataPortParam>();
- dataport.add(new DataPortParam("in", "RTC::TimedFloatSeq", "", 0));
- rtcParam.getInports().addAll(dataport);
-
- List<DataPortParam> dataoutport = new ArrayList<DataPortParam>();
- dataoutport.add(new DataPortParam("out", "RTC::TimedFloatSeq", "", 0));
- rtcParam.getOutports().addAll(dataoutport);
-
- ServicePortParam service1 = new ServicePortParam("MySVPro",0);
- List<ServicePortInterfaceParam> srvinterts = new ArrayList<ServicePortInterfaceParam>();
- ServicePortInterfaceParam int1 = new ServicePortInterfaceParam(service1, "myservice0", "", "",
- rootPath + "resource\\Python\\AIST3\\MyService.idl", "MyService", "", 0);
- srvinterts.add(int1);
- service1.getServicePortInterfaces().addAll(srvinterts);
- List<ServicePortParam> srvports = new ArrayList<ServicePortParam>();
- srvports.add(service1);
-
- ServicePortParam service2 = new ServicePortParam("MySVCon",0);
- List<ServicePortInterfaceParam> srvinterts2 = new ArrayList<ServicePortInterfaceParam>();
- ServicePortInterfaceParam int2 = new ServicePortInterfaceParam(service1, "myservice1", "", "",
- rootPath + "resource\\Python\\AIST3\\MyService.idl", "MyService", "", 1);
- srvinterts2.add(int2);
- service2.getServicePortInterfaces().addAll(srvinterts2);
- srvports.add(service2);
- rtcParam.getServicePorts().addAll(srvports);
- genParam.getRtcParams().add(rtcParam);
-
- Generator generator = new Generator();
- GenerateManager manager = new PythonGenerateManager();
- generator.addGenerateManager(manager);
- List<GeneratedResult> result = generator.generateTemplateCode(genParam);
-
- String resourceDir = rootPath + "\\resource\\Python\\AIST3\\";
-
- checkCode(result, resourceDir, "test.py");
- checkCode(result, resourceDir, "_GlobalIDL/__init__.py");
- checkCode(result, resourceDir, "_GlobalIDL__POA/__init__.py");
- checkCode(result, resourceDir, "MyService_idl_example.py");
- checkCode(result, resourceDir, "README.test");
- checkCode(result, resourceDir, "MyService_idl.py");
- }
-
- public void testAIST2() throws Exception{
- GeneratorParam genParam = new GeneratorParam();
- RtcParam rtcParam = new RtcParam(genParam, true);
- rtcParam.setOutputProject(rootPath + "\\resource\\work");
- rtcParam.setLanguage(IRtcBuilderConstantsPython.LANG_PYTHON);
- rtcParam.setLanguageArg(IRtcBuilderConstantsPython.LANG_PYTHON_ARG);
- rtcParam.setName("test");
- rtcParam.setDescription("test component");
- rtcParam.setVersion("1.0.0");
- rtcParam.setVender("S.Kurihara");
- rtcParam.setCategory("example");
- rtcParam.setComponentType("STATIC");
- rtcParam.setActivityType("PERIODIC");
- rtcParam.setMaxInstance(1);
- rtcParam.setRtmVersion("0.4.2");
-
- List<DataPortParam> dataport = new ArrayList<DataPortParam>();
- dataport.add(new DataPortParam("in", "RTC::TimedFloatSeq", "", 0));
- rtcParam.getInports().addAll(dataport);
-
- List<DataPortParam> dataoutport = new ArrayList<DataPortParam>();
- dataoutport.add(new DataPortParam("out", "RTC::TimedFloatSeq", "", 0));
- rtcParam.getOutports().addAll(dataoutport);
-
- ServicePortParam service1 = new ServicePortParam("MySVCon",0);
- List<ServicePortInterfaceParam> srvinterts = new ArrayList<ServicePortInterfaceParam>();
- ServicePortInterfaceParam int1 = new ServicePortInterfaceParam(service1, "myservice", "", "",
- rootPath + "resource\\Python\\AIST2\\MyService.idl", "MyService", "", 1);
- srvinterts.add(int1);
- service1.getServicePortInterfaces().addAll(srvinterts);
- List<ServicePortParam> srvports = new ArrayList<ServicePortParam>();
- srvports.add(service1);
- rtcParam.getServicePorts().addAll(srvports);
- genParam.getRtcParams().add(rtcParam);
-
- Generator generator = new Generator();
- GenerateManager manager = new PythonGenerateManager();
- generator.addGenerateManager(manager);
- List<GeneratedResult> result = generator.generateTemplateCode(genParam);
-
- String resourceDir = rootPath + "\\resource\\Python\\AIST2\\";
-
- checkCode(result, resourceDir, "test.py");
- checkCode(result, resourceDir, "_GlobalIDL/__init__.py");
- checkCode(result, resourceDir, "_GlobalIDL__POA/__init__.py");
- checkCode(result, resourceDir, "README.test");
- checkCode(result, resourceDir, "MyService_idl.py");
- }
-
- public void testType2() throws Exception{
- GeneratorParam genParam = new GeneratorParam();
- RtcParam rtcParam = new RtcParam(genParam, true);
- rtcParam.setOutputProject(rootPath + "\\resource\\work");
- rtcParam.setLanguage(IRtcBuilderConstantsPython.LANG_PYTHON);
- rtcParam.setLanguageArg(IRtcBuilderConstantsPython.LANG_PYTHON_ARG);
- rtcParam.setName("test");
- rtcParam.setDescription("test component");
- rtcParam.setVersion("1.0.0");
- rtcParam.setVender("S.Kurihara");
- rtcParam.setCategory("exmple");
- rtcParam.setComponentType("STATIC");
- rtcParam.setActivityType("PERIODIC");
- rtcParam.setMaxInstance(1);
- rtcParam.setRtmVersion("0.4.2");
-
- ServicePortParam service1 = new ServicePortParam("MySVPro",0);
- List<ServicePortInterfaceParam> srvinterts = new ArrayList<ServicePortInterfaceParam>();
- ServicePortInterfaceParam int1 = new ServicePortInterfaceParam(service1, "myservice", "", "",
- rootPath + "resource\\Python\\type2\\MyService.idl", "MyService", "", 0);
- srvinterts.add(int1);
- service1.getServicePortInterfaces().addAll(srvinterts);
- List<ServicePortParam> srvports = new ArrayList<ServicePortParam>();
- srvports.add(service1);
- rtcParam.getServicePorts().addAll(srvports);
- genParam.getRtcParams().add(rtcParam);
-
- Generator generator = new Generator();
- GenerateManager manager = new PythonGenerateManager();
- generator.addGenerateManager(manager);
- List<GeneratedResult> result = generator.generateTemplateCode(genParam);
-
- String resourceDir = rootPath + "\\resource\\Python\\type2\\";
-
- checkCode(result, resourceDir, "test.py");
- checkCode(result, resourceDir, "MyService_idl.py");
- checkCode(result, resourceDir, "_GlobalIDL/__init__.py");
- checkCode(result, resourceDir, "_GlobalIDL__POA/__init__.py");
- checkCode(result, resourceDir, "MyService_idl_example.py");
- checkCode(result, resourceDir, "README.test");
- }
-
- public void testType() throws Exception{
- GeneratorParam genParam = new GeneratorParam();
- RtcParam rtcParam = new RtcParam(genParam, true);
- rtcParam.setOutputProject(rootPath + "\\resource\\work");
- rtcParam.setLanguage(IRtcBuilderConstantsPython.LANG_PYTHON);
- rtcParam.setLanguageArg(IRtcBuilderConstantsPython.LANG_PYTHON_ARG);
- rtcParam.setName("test");
- rtcParam.setDescription("test component");
- rtcParam.setVersion("1.0.0");
- rtcParam.setVender("S.Kurihara");
- rtcParam.setCategory("exmple");
- rtcParam.setComponentType("STATIC");
- rtcParam.setActivityType("PERIODIC");
- rtcParam.setMaxInstance(1);
- rtcParam.setRtmVersion("0.4.2");
-
- ServicePortParam service1 = new ServicePortParam("MySVPro",0);
- List<ServicePortInterfaceParam> srvinterts = new ArrayList<ServicePortInterfaceParam>();
- ServicePortInterfaceParam int1 = new ServicePortInterfaceParam(service1, "myservice", "", "",
- rootPath + "resource\\Python\\type\\MyService.idl", "MyService", "", 0);
- srvinterts.add(int1);
- service1.getServicePortInterfaces().addAll(srvinterts);
- List<ServicePortParam> srvports = new ArrayList<ServicePortParam>();
- srvports.add(service1);
- rtcParam.getServicePorts().addAll(srvports);
- genParam.getRtcParams().add(rtcParam);
-
- Generator generator = new Generator();
- GenerateManager manager = new PythonGenerateManager();
- generator.addGenerateManager(manager);
- List<GeneratedResult> result = generator.generateTemplateCode(genParam);
-
- String resourceDir = rootPath + "\\resource\\Python\\type\\";
-
- checkCode(result, resourceDir, "test.py");
- checkCode(result, resourceDir, "MyService_idl.py");
- checkCode(result, resourceDir, "_GlobalIDL/__init__.py");
- checkCode(result, resourceDir, "_GlobalIDL__POA/__init__.py");
- checkCode(result, resourceDir, "MyService_idl_example.py");
- checkCode(result, resourceDir, "README.test");
- }
-
- public void testServicePort() throws Exception{
- GeneratorParam genParam = new GeneratorParam();
- RtcParam rtcParam = new RtcParam(genParam, true);
- rtcParam.setOutputProject(rootPath + "\\resource\\work");
- rtcParam.setLanguage(IRtcBuilderConstantsPython.LANG_PYTHON);
- rtcParam.setLanguageArg(IRtcBuilderConstantsPython.LANG_PYTHON_ARG);
- rtcParam.setName("test");
- rtcParam.setDescription("test component");
- rtcParam.setVersion("1.0.0");
- rtcParam.setVender("S.Kurihara");
- rtcParam.setCategory("exmple");
- rtcParam.setComponentType("STATIC");
- rtcParam.setActivityType("PERIODIC");
- rtcParam.setMaxInstance(1);
- rtcParam.setRtmVersion("0.4.2");
-
- ServicePortParam service1 = new ServicePortParam("MySVPro",0);
- List<ServicePortInterfaceParam> srvinterts = new ArrayList<ServicePortInterfaceParam>();
- ServicePortInterfaceParam int1 = new ServicePortInterfaceParam(service1, "myservice", "", "",
- rootPath + "resource\\Python\\AIST1\\MyService.idl", "MyService", "", 0);
- srvinterts.add(int1);
- service1.getServicePortInterfaces().addAll(srvinterts);
- List<ServicePortParam> srvports = new ArrayList<ServicePortParam>();
- srvports.add(service1);
- rtcParam.getServicePorts().addAll(srvports);
- genParam.getRtcParams().add(rtcParam);
-
- Generator generator = new Generator();
- GenerateManager manager = new PythonGenerateManager();
- generator.addGenerateManager(manager);
- List<GeneratedResult> result = generator.generateTemplateCode(genParam);
-
- String resourceDir = rootPath + "\\resource\\Python\\AIST1\\";
-
- checkCode(result, resourceDir, "test.py");
- checkCode(result, resourceDir, "_GlobalIDL/__init__.py");
- checkCode(result, resourceDir, "_GlobalIDL__POA/__init__.py");
- checkCode(result, resourceDir, "MyService_idl_example.py");
- checkCode(result, resourceDir, "README.test");
- checkCode(result, resourceDir, "MyService_idl.py");
- }
-}
Deleted: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/AllTestsPy.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/AllTestsPy.java 2012-02-07 14:48:47 UTC (rev 258)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/AllTestsPy.java 2012-02-10 16:57:54 UTC (rev 259)
@@ -1,31 +0,0 @@
-package jp.go.aist.rtm.rtcbuilder.python._test;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-public class AllTestsPy {
-
- public static Test suite() {
- TestSuite suite = new TestSuite(
- "Test for jp.go.aist.rtm.rtcbuilder._test");
- //$JUnit-BEGIN$
- suite.addTestSuite(ConfigSetTest.class);
- suite.addTestSuite(DiffTest.class);
- suite.addTestSuite(LuckTest.class);
- suite.addTestSuite(AISTTest.class);
- suite.addTestSuite(MultiTest.class);
- suite.addTestSuite(BaseTest.class);
- suite.addTestSuite(VarTest.class);
- suite.addTestSuite(PyDocTest.class);
- suite.addTestSuite(PyDocLongTest.class);
- suite.addTestSuite(PyExCxtTest.class);
- suite.addTestSuite(PySystemConfigTest.class);
- suite.addTestSuite(PyImplTest.class);
- suite.addTestSuite(PyVariableTest.class);
- ////
- suite.addTestSuite(jp.go.aist.rtm.rtcbuilder.python._test._100.BaseTest.class);
- //$JUnit-END$
- return suite;
- }
-
-}
Deleted: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/BaseTest.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/BaseTest.java 2012-02-07 14:48:47 UTC (rev 258)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/BaseTest.java 2012-02-10 16:57:54 UTC (rev 259)
@@ -1,295 +0,0 @@
-package jp.go.aist.rtm.rtcbuilder.python._test;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import jp.go.aist.rtm.rtcbuilder.Generator;
-import jp.go.aist.rtm.rtcbuilder.generator.GeneratedResult;
-import jp.go.aist.rtm.rtcbuilder.generator.param.DataPortParam;
-import jp.go.aist.rtm.rtcbuilder.generator.param.GeneratorParam;
-import jp.go.aist.rtm.rtcbuilder.generator.param.RtcParam;
-import jp.go.aist.rtm.rtcbuilder.generator.param.ServicePortInterfaceParam;
-import jp.go.aist.rtm.rtcbuilder.generator.param.ServicePortParam;
-import jp.go.aist.rtm.rtcbuilder.manager.GenerateManager;
-import jp.go.aist.rtm.rtcbuilder.python.IRtcBuilderConstantsPython;
-import jp.go.aist.rtm.rtcbuilder.python.manager.PythonGenerateManager;
-
-public class BaseTest extends TestBase {
-
- protected void setUp() throws Exception {
- }
-
- public void testServicePort2() throws Exception{
- GeneratorParam genParam = new GeneratorParam();
- RtcParam rtcParam = new RtcParam(genParam, true);
- rtcParam.setOutputProject(rootPath + "\\resource\\work");
- rtcParam.setLanguage(IRtcBuilderConstantsPython.LANG_PYTHON);
- rtcParam.setLanguageArg(IRtcBuilderConstantsPython.LANG_PYTHON_ARG);
- rtcParam.setName("foo");
- rtcParam.setDescription("MDesc");
- rtcParam.setVersion("1.0.1");
- rtcParam.setVender("TA");
- rtcParam.setCategory("Manip");
- rtcParam.setComponentType("STATIC2");
- rtcParam.setActivityType("PERIODIC2");
- rtcParam.setMaxInstance(5);
- rtcParam.setRtmVersion("0.4.2");
-
- genParam.getRtcParams().add(rtcParam);
- List<DataPortParam> dataport = new ArrayList<DataPortParam>();
- dataport.add(new DataPortParam("InP1", "RTC::TimedShort", "", 0));
- dataport.add(new DataPortParam("InP2", "RTC::TimedLong", "", 0));
- rtcParam.getInports().addAll(dataport);
- List<DataPortParam> outport = new ArrayList<DataPortParam>();
- outport.add(new DataPortParam("OutP1", "RTC::TimedLong", "", 0));
- outport.add(new DataPortParam("OutP2", "RTC::TimedFloat", "", 0));
- rtcParam.getOutports().addAll(outport);
-
- ServicePortParam service1 = new ServicePortParam("svPort",0);
- List<ServicePortInterfaceParam> srvinterts = new ArrayList<ServicePortInterfaceParam>();
- ServicePortInterfaceParam int1 = new ServicePortInterfaceParam(service1, "acc", "", "",
- rootPath + "\\resource\\MyService.idl", "MyService", "", 0);
- srvinterts.add(int1);
- service1.getServicePortInterfaces().addAll(srvinterts);
- List<ServicePortParam> srvports = new ArrayList<ServicePortParam>();
- srvports.add(service1);
-
- ServicePortParam service2 = new ServicePortParam("cmPort",0);
- List<ServicePortInterfaceParam> srvinterts2 = new ArrayList<ServicePortInterfaceParam>();
- ServicePortInterfaceParam int2 = new ServicePortInterfaceParam(service2, "rate", "", "",
- rootPath + "\\resource\\DAQService.idl", "DAQService", "", 1);
- srvinterts2.add(int2);
- service2.getServicePortInterfaces().addAll(srvinterts2);
- srvports.add(service2);
-
- rtcParam.getServicePorts().addAll(srvports);
-
- Generator generator = new Generator();
- GenerateManager manager = new PythonGenerateManager();
- generator.addGenerateManager(manager);
- List<GeneratedResult> result = generator.generateTemplateCode(genParam);
-
- String resourceDir = rootPath + "\\resource\\Python\\service2\\";
-
- checkCode(result, resourceDir, "foo.py");
- checkCode(result, resourceDir, "MyService_idl.py");
- checkCode(result, resourceDir, "DAQService_idl.py");
- checkCode(result, resourceDir, "_GlobalIDL/__init__.py");
- checkCode(result, resourceDir, "_GlobalIDL__POA/__init__.py");
- checkCode(result, resourceDir, "MyService_idl_example.py");
- checkCode(result, resourceDir, "README.foo");
- }
-
- public void testServicePort1() throws Exception{
- GeneratorParam genParam = new GeneratorParam();
- RtcParam rtcParam = new RtcParam(genParam, true);
- rtcParam.setOutputProject(rootPath + "\\resource\\work");
- rtcParam.setLanguage(IRtcBuilderConstantsPython.LANG_PYTHON);
- rtcParam.setLanguageArg(IRtcBuilderConstantsPython.LANG_PYTHON_ARG);
- rtcParam.setName("foo");
- rtcParam.setDescription("MDesc");
- rtcParam.setVersion("1.0.1");
- rtcParam.setVender("TA");
- rtcParam.setCategory("Manip");
- rtcParam.setComponentType("STATIC2");
- rtcParam.setActivityType("PERIODIC2");
- rtcParam.setMaxInstance(5);
- rtcParam.setRtmVersion("0.4.2");
- genParam.getRtcParams().add(rtcParam);
-
- List<DataPortParam> dataport = new ArrayList<DataPortParam>();
- dataport.add(new DataPortParam("InP1", "RTC::TimedShort", "", 0));
- dataport.add(new DataPortParam("InP2", "RTC::TimedLong", "", 0));
- rtcParam.getInports().addAll(dataport);
- List<DataPortParam> outport = new ArrayList<DataPortParam>();
- outport.add(new DataPortParam("OutP1", "RTC::TimedLong", "", 0));
- outport.add(new DataPortParam("OutP2", "RTC::TimedFloat", "", 0));
- rtcParam.getOutports().addAll(outport);
-
- ServicePortParam service1 = new ServicePortParam("svPort",0);
- List<ServicePortInterfaceParam> srvinterts = new ArrayList<ServicePortInterfaceParam>();
- ServicePortInterfaceParam int1 = new ServicePortInterfaceParam(service1, "acc", "", "",
- rootPath + "\\resource\\MyService.idl", "MyService", "", 0);
- srvinterts.add(int1);
- service1.getServicePortInterfaces().addAll(srvinterts);
- List<ServicePortParam> srvports = new ArrayList<ServicePortParam>();
- srvports.add(service1);
- rtcParam.getServicePorts().addAll(srvports);
-
- Generator generator = new Generator();
- GenerateManager manager = new PythonGenerateManager();
- generator.addGenerateManager(manager);
- List<GeneratedResult> result = generator.generateTemplateCode(genParam);
-
- String resourceDir = rootPath + "\\resource\\Python\\service1\\";
-
- checkCode(result, resourceDir, "foo.py");
- checkCode(result, resourceDir, "MyService_idl.py");
- checkCode(result, resourceDir, "_GlobalIDL/__init__.py");
- checkCode(result, resourceDir, "_GlobalIDL__POA/__init__.py");
- checkCode(result, resourceDir, "MyService_idl_example.py");
- checkCode(result, resourceDir, "README.foo");
- }
-
- public void testOutPort2() throws Exception{
- GeneratorParam genParam = new GeneratorParam();
- RtcParam rtcParam = new RtcParam(genParam, true);
- rtcParam.setOutputProject(rootPath + "\\resource\\work");
- rtcParam.setLanguage(IRtcBuilderConstantsPython.LANG_PYTHON);
- rtcParam.setLanguageArg(IRtcBuilderConstantsPython.LANG_PYTHON_ARG);
- rtcParam.setName("foo");
- rtcParam.setDescription("MDesc");
- rtcParam.setVersion("1.0.1");
- rtcParam.setVender("TA");
- rtcParam.setCategory("Manip");
- rtcParam.setComponentType("STATIC2");
- rtcParam.setActivityType("PERIODIC2");
- rtcParam.setMaxInstance(5);
- rtcParam.setRtmVersion("0.4.2");
- genParam.getRtcParams().add(rtcParam);
- List<DataPortParam> dataport = new ArrayList<DataPortParam>();
- dataport.add(new DataPortParam("InP1", "RTC::TimedShort", "", 0));
- dataport.add(new DataPortParam("InP2", "RTC::TimedLong", "", 0));
- rtcParam.getInports().addAll(dataport);
- List<DataPortParam> outport = new ArrayList<DataPortParam>();
- outport.add(new DataPortParam("OutP1", "RTC::TimedLong", "", 0));
- outport.add(new DataPortParam("OutP2", "RTC::TimedFloat", "", 0));
- rtcParam.getOutports().addAll(outport);
-
- Generator generator = new Generator();
- GenerateManager manager = new PythonGenerateManager();
- generator.addGenerateManager(manager);
- List<GeneratedResult> result = generator.generateTemplateCode(genParam);
-
- String resourceDir = rootPath + "\\resource\\Python\\outport2\\";
-
- checkCode(result, resourceDir, "foo.py");
- checkCode(result, resourceDir, "README.foo");
- }
-
- public void testOutPort1() throws Exception{
- GeneratorParam genParam = new GeneratorParam();
- RtcParam rtcParam = new RtcParam(genParam, true);
- rtcParam.setOutputProject(rootPath + "\\resource\\work");
- rtcParam.setLanguage(IRtcBuilderConstantsPython.LANG_PYTHON);
- rtcParam.setLanguageArg(IRtcBuilderConstantsPython.LANG_PYTHON_ARG);
- rtcParam.setName("foo");
- rtcParam.setDescription("MDesc");
- rtcParam.setVersion("1.0.1");
- rtcParam.setVender("TA");
- rtcParam.setCategory("Manip");
- rtcParam.setComponentType("STATIC2");
- rtcParam.setActivityType("PERIODIC2");
- rtcParam.setRtmVersion("0.4.2");
- rtcParam.setMaxInstance(5);
- genParam.getRtcParams().add(rtcParam);
- List<DataPortParam> dataport = new ArrayList<DataPortParam>();
- dataport.add(new DataPortParam("InP1", "RTC::TimedShort", "", 0));
- dataport.add(new DataPortParam("InP2", "RTC::TimedLong", "", 0));
- rtcParam.getInports().addAll(dataport);
- List<DataPortParam> outport = new ArrayList<DataPortParam>();
- outport.add(new DataPortParam("OutP1", "RTC::TimedLong", "", 0));
- rtcParam.getOutports().addAll(outport);
-
- Generator generator = new Generator();
- GenerateManager manager = new PythonGenerateManager();
- generator.addGenerateManager(manager);
- List<GeneratedResult> result = generator.generateTemplateCode(genParam);
-
- String resourceDir = rootPath + "\\resource\\Python\\outport1\\";
-
- checkCode(result, resourceDir, "foo.py");
- checkCode(result, resourceDir, "README.foo");
- }
-
- public void testInPort2() throws Exception{
- GeneratorParam genParam = new GeneratorParam();
- RtcParam rtcParam = new RtcParam(genParam, true);
- rtcParam.setOutputProject(rootPath + "\\resource\\work");
- rtcParam.setLanguage(IRtcBuilderConstantsPython.LANG_PYTHON);
- rtcParam.setLanguageArg(IRtcBuilderConstantsPython.LANG_PYTHON_ARG);
- rtcParam.setName("foo");
- rtcParam.setDescription("MDesc");
- rtcParam.setVersion("1.0.1");
- rtcParam.setVender("TA");
- rtcParam.setCategory("Manip");
- rtcParam.setComponentType("STATIC2");
- rtcParam.setActivityType("PERIODIC2");
- rtcParam.setRtmVersion("0.4.2");
- rtcParam.setMaxInstance(5);
- genParam.getRtcParams().add(rtcParam);
- List<DataPortParam> dataport = new ArrayList<DataPortParam>();
- dataport.add(new DataPortParam("InP1", "RTC::TimedShort", "", 0));
- dataport.add(new DataPortParam("InP2", "RTC::TimedLong", "", 0));
- rtcParam.getInports().addAll(dataport);
-
- Generator generator = new Generator();
- GenerateManager manager = new PythonGenerateManager();
- generator.addGenerateManager(manager);
- List<GeneratedResult> result = generator.generateTemplateCode(genParam);
-
- String resourceDir = rootPath + "\\resource\\Python\\inport2\\";
-
- checkCode(result, resourceDir, "foo.py");
- checkCode(result, resourceDir, "README.foo");
- }
-
- public void testInPort() throws Exception{
- GeneratorParam genParam = new GeneratorParam();
- RtcParam rtcParam = new RtcParam(genParam, true);
- rtcParam.setOutputProject(rootPath + "\\resource\\work");
- rtcParam.setLanguage(IRtcBuilderConstantsPython.LANG_PYTHON);
- rtcParam.setLanguageArg(IRtcBuilderConstantsPython.LANG_PYTHON_ARG);
- rtcParam.setName("foo");
- rtcParam.setDescription("MDesc");
- rtcParam.setVersion("1.0.1");
- rtcParam.setVender("TA");
- rtcParam.setCategory("Manip");
- rtcParam.setComponentType("STATIC2");
- rtcParam.setActivityType("PERIODIC2");
- rtcParam.setMaxInstance(5);
- rtcParam.setRtmVersion("0.4.2");
- genParam.getRtcParams().add(rtcParam);
- List<DataPortParam> dataport = new ArrayList<DataPortParam>();
- dataport.add(new DataPortParam("InP1", "RTC::TimedShort", "", 0));
- rtcParam.getInports().addAll(dataport);
-
- Generator generator = new Generator();
- GenerateManager manager = new PythonGenerateManager();
- generator.addGenerateManager(manager);
- List<GeneratedResult> result = generator.generateTemplateCode(genParam);
-
- String resourceDir = rootPath + "\\resource\\Python\\inport1\\";
-
- checkCode(result, resourceDir, "foo.py");
- checkCode(result, resourceDir, "README.foo");
- }
-
- public void testBasic() throws Exception{
- GeneratorParam genParam = new GeneratorParam();
- RtcParam rtcParam = new RtcParam(genParam, true);
- rtcParam.setOutputProject(rootPath + "\\resource\\work");
- rtcParam.setLanguage(IRtcBuilderConstantsPython.LANG_PYTHON);
- rtcParam.setLanguageArg(IRtcBuilderConstantsPython.LANG_PYTHON_ARG);
- rtcParam.setName("foo");
- rtcParam.setDescription("MDesc");
- rtcParam.setVersion("1.0.1");
- rtcParam.setVender("TA");
- rtcParam.setCategory("Manip");
- rtcParam.setComponentType("STATIC2");
- rtcParam.setActivityType("PERIODIC2");
- rtcParam.setMaxInstance(5);
- rtcParam.setRtmVersion("0.4.2");
- genParam.getRtcParams().add(rtcParam);
-
- Generator generator = new Generator();
- GenerateManager manager = new PythonGenerateManager();
- generator.addGenerateManager(manager);
- List<GeneratedResult> result = generator.generateTemplateCode(genParam);
-
- String resourceDir = rootPath + "\\resource\\Python\\name\\";
-
- checkCode(result, resourceDir, "foo.py");
- checkCode(result, resourceDir, "README.foo");
- }
-}
Deleted: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/ConfigSetTest.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/ConfigSetTest.java 2012-02-07 14:48:47 UTC (rev 258)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/ConfigSetTest.java 2012-02-10 16:57:54 UTC (rev 259)
@@ -1,157 +0,0 @@
-package jp.go.aist.rtm.rtcbuilder.python._test;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import jp.go.aist.rtm.rtcbuilder.Generator;
-import jp.go.aist.rtm.rtcbuilder.generator.GeneratedResult;
-import jp.go.aist.rtm.rtcbuilder.generator.param.ConfigSetParam;
-import jp.go.aist.rtm.rtcbuilder.generator.param.GeneratorParam;
-import jp.go.aist.rtm.rtcbuilder.generator.param.RtcParam;
-import jp.go.aist.rtm.rtcbuilder.manager.GenerateManager;
-import jp.go.aist.rtm.rtcbuilder.python.IRtcBuilderConstantsPython;
-import jp.go.aist.rtm.rtcbuilder.python.manager.PythonGenerateManager;
-
-public class ConfigSetTest extends TestBase {
-
- protected void setUp() throws Exception {
- }
-
- public void testConfigSet() throws Exception{
- GeneratorParam genParam = new GeneratorParam();
- RtcParam rtcParam = new RtcParam(genParam, true);
- rtcParam.setOutputProject(rootPath + "\\resource\\work");
- rtcParam.setLanguage(IRtcBuilderConstantsPython.LANG_PYTHON);
- rtcParam.setLanguageArg(IRtcBuilderConstantsPython.LANG_PYTHON_ARG);
- rtcParam.setName("foo");
- rtcParam.setDescription("MDesc");
- rtcParam.setVersion("1.0.3");
- rtcParam.setVender("TA2");
- rtcParam.setCategory("manip2");
- rtcParam.setComponentType("STATIC2");
- rtcParam.setActivityType("PERIODIC2");
- rtcParam.setMaxInstance(3);
- rtcParam.setRtmVersion("0.4.2");
-
- genParam.getRtcParams().add(rtcParam);
- List<ConfigSetParam> configset = new ArrayList<ConfigSetParam>();
- configset.add(new ConfigSetParam("int_param0","int","","0"));
- rtcParam.getConfigParams().addAll(configset);
-
- Generator generator = new Generator();
- GenerateManager manager = new PythonGenerateManager();
- generator.addGenerateManager(manager);
- List<GeneratedResult> result = generator.generateTemplateCode(genParam);
-
- String resourceDir = rootPath + "\\resource\\Python\\ConfigSet\\configset1\\";
-
- checkCode(result, resourceDir, "foo.py");
- checkCode(result, resourceDir, "README.foo");
- }
-
- public void testConfigSet2() throws Exception{
- GeneratorParam genParam = new GeneratorParam();
- RtcParam rtcParam = new RtcParam(genParam, true);
- rtcParam.setOutputProject(rootPath + "\\resource\\work");
- rtcParam.setLanguage(IRtcBuilderConstantsPython.LANG_PYTHON);
- rtcParam.setLanguageArg(IRtcBuilderConstantsPython.LANG_PYTHON_ARG);
- rtcParam.setName("foo");
- rtcParam.setDescription("MDesc");
- rtcParam.setVersion("1.0.3");
- rtcParam.setVender("TA2");
- rtcParam.setCategory("manip2");
- rtcParam.setComponentType("STATIC2");
- rtcParam.setActivityType("PERIODIC2");
- rtcParam.setMaxInstance(3);
- rtcParam.setRtmVersion("0.4.2");
-
- genParam.getRtcParams().add(rtcParam);
- List<ConfigSetParam> configset = new ArrayList<ConfigSetParam>();
- configset.add(new ConfigSetParam("int_param0","int","","0"));
- configset.add(new ConfigSetParam("int_param1","int","","1"));
- rtcParam.getConfigParams().addAll(configset);
-
- Generator generator = new Generator();
- GenerateManager manager = new PythonGenerateManager();
- generator.addGenerateManager(manager);
- List<GeneratedResult> result = generator.generateTemplateCode(genParam);
-
- String resourceDir = rootPath + "\\resource\\Python\\ConfigSet\\configset2\\";
-
- checkCode(result, resourceDir, "foo.py");
- checkCode(result, resourceDir, "README.foo");
- }
-
- public void testConfigSet3() throws Exception{
- GeneratorParam genParam = new GeneratorParam();
- RtcParam rtcParam = new RtcParam(genParam, true);
- rtcParam.setOutputProject(rootPath + "\\resource\\work");
- rtcParam.setLanguage(IRtcBuilderConstantsPython.LANG_PYTHON);
- rtcParam.setLanguageArg(IRtcBuilderConstantsPython.LANG_PYTHON_ARG);
- rtcParam.setName("foo");
- rtcParam.setDescription("MDesc");
- rtcParam.setVersion("1.0.3");
- rtcParam.setVender("TA2");
- rtcParam.setCategory("manip2");
- rtcParam.setComponentType("STATIC2");
- rtcParam.setActivityType("PERIODIC2");
- rtcParam.setMaxInstance(3);
- rtcParam.setRtmVersion("0.4.2");
-
- genParam.getRtcParams().add(rtcParam);
- List<ConfigSetParam> configset = new ArrayList<ConfigSetParam>();
- configset.add(new ConfigSetParam("int_param0","int","","0"));
- configset.add(new ConfigSetParam("int_param1","int","","1"));
- configset.add(new ConfigSetParam("double_param0","double","","0.11"));
- configset.add(new ConfigSetParam("str_param0","String","","hoge"));
- configset.add(new ConfigSetParam("str_param1","String","","dara"));
- rtcParam.getConfigParams().addAll(configset);
-
- Generator generator = new Generator();
- GenerateManager manager = new PythonGenerateManager();
- generator.addGenerateManager(manager);
- List<GeneratedResult> result = generator.generateTemplateCode(genParam);
-
- String resourceDir = rootPath + "\\resource\\Python\\ConfigSet\\configset3\\";
-
- checkCode(result, resourceDir, "foo.py");
- checkCode(result, resourceDir, "README.foo");
- }
-
- public void testConfigSet4() throws Exception{
- GeneratorParam genParam = new GeneratorParam();
- RtcParam rtcParam = new RtcParam(genParam, true);
- rtcParam.setOutputProject(rootPath + "\\resource\\work");
- rtcParam.setLanguage(IRtcBuilderConstantsPython.LANG_PYTHON);
- rtcParam.setLanguageArg(IRtcBuilderConstantsPython.LANG_PYTHON_ARG);
- rtcParam.setName("foo");
- rtcParam.setDescription("MDesc");
- rtcParam.setVersion("1.0.3");
- rtcParam.setVender("TA2");
- rtcParam.setCategory("manip2");
- rtcParam.setComponentType("STATIC2");
- rtcParam.setActivityType("PERIODIC2");
- rtcParam.setMaxInstance(3);
- rtcParam.setRtmVersion("0.4.2");
-
- genParam.getRtcParams().add(rtcParam);
- List<ConfigSetParam> configset = new ArrayList<ConfigSetParam>();
- configset.add(new ConfigSetParam("int_param0","int","","0"));
- configset.add(new ConfigSetParam("int_param1","int","","1"));
- configset.add(new ConfigSetParam("double_param0","double","","0.11"));
- configset.add(new ConfigSetParam("str_param0","String","","hoge"));
- configset.add(new ConfigSetParam("str_param1","String","","dara"));
- configset.add(new ConfigSetParam("vector_param0","double","","0.0,1.0,2.0,3.0"));
- rtcParam.getConfigParams().addAll(configset);
-
- Generator generator = new Generator();
- GenerateManager manager = new PythonGenerateManager();
- generator.addGenerateManager(manager);
- List<GeneratedResult> result = generator.generateTemplateCode(genParam);
-
- String resourceDir = rootPath + "\\resource\\Python\\ConfigSet\\configset4\\";
-
- checkCode(result, resourceDir, "foo.py");
- checkCode(result, resourceDir, "README.foo");
- }
-}
Deleted: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/DiffTest.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/DiffTest.java 2012-02-07 14:48:47 UTC (rev 258)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/DiffTest.java 2012-02-10 16:57:54 UTC (rev 259)
@@ -1,106 +0,0 @@
-package jp.go.aist.rtm.rtcbuilder.python._test;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import jp.go.aist.rtm.rtcbuilder.Generator;
-import jp.go.aist.rtm.rtcbuilder.generator.GeneratedResult;
-import jp.go.aist.rtm.rtcbuilder.generator.param.GeneratorParam;
-import jp.go.aist.rtm.rtcbuilder.generator.param.RtcParam;
-import jp.go.aist.rtm.rtcbuilder.generator.param.ServicePortInterfaceParam;
-import jp.go.aist.rtm.rtcbuilder.generator.param.ServicePortParam;
-import jp.go.aist.rtm.rtcbuilder.manager.GenerateManager;
-import jp.go.aist.rtm.rtcbuilder.python.IRtcBuilderConstantsPython;
-import jp.go.aist.rtm.rtcbuilder.python.manager.PythonGenerateManager;
-
-public class DiffTest extends TestBase {
-
- protected void setUp() throws Exception {
- }
-
- public void testDiffName2() throws Exception{
- GeneratorParam genParam = new GeneratorParam();
- RtcParam rtcParam = new RtcParam(genParam, true);
- rtcParam.setOutputProject(rootPath + "\\resource\\work");
- rtcParam.setLanguage(IRtcBuilderConstantsPython.LANG_PYTHON);
- rtcParam.setLanguageArg(IRtcBuilderConstantsPython.LANG_PYTHON_ARG);
- rtcParam.setName("test");
- rtcParam.setDescription("test component");
- rtcParam.setVersion("1.0.0");
- rtcParam.setVender("S.Kurihara");
- rtcParam.setCategory("sample");
- rtcParam.setComponentType("STATIC");
- rtcParam.setActivityType("PERIODIC");
- rtcParam.setMaxInstance(1);
- rtcParam.setRtmVersion("0.4.2");
-
- ServicePortParam service1 = new ServicePortParam("MySVPro0",0);
- List<ServicePortInterfaceParam> srvinterts = new ArrayList<ServicePortInterfaceParam>();
- ServicePortInterfaceParam int1 = new ServicePortInterfaceParam(service1, "myservice0", "", "",
- rootPath + "\\resource\\MyService3.idl", "MyService", "", 0);
- srvinterts.add(int1);
- service1.getServicePortInterfaces().addAll(srvinterts);
- List<ServicePortParam> srvports = new ArrayList<ServicePortParam>();
- srvports.add(service1);
- rtcParam.getServicePorts().addAll(srvports);
- genParam.getRtcParams().add(rtcParam);
-
- Generator generator = new Generator();
- GenerateManager manager = new PythonGenerateManager();
- generator.addGenerateManager(manager);
- List<GeneratedResult> result = generator.generateTemplateCode(genParam);
-
- String resourceDir = rootPath + "\\resource\\Python\\diffname2\\";
-
- checkCode(result, resourceDir, "test.py");
- checkCode(result, resourceDir, "MyService3_idl.py");
-// checkCode(result, resourceDir, "DAQService_idl.py");
- checkCode(result, resourceDir, "_GlobalIDL/__init__.py");
- checkCode(result, resourceDir, "_GlobalIDL__POA/__init__.py");
- checkCode(result, resourceDir, "MyService3_idl_example.py");
-// checkCode(result, resourceDir, "DAQService_idl_example.py");
- checkCode(result, resourceDir, "README.test");
- }
-
- public void testDiffName() throws Exception{
- GeneratorParam genParam = new GeneratorParam();
- RtcParam rtcParam = new RtcParam(genParam, true);
- rtcParam.setOutputProject(rootPath + "\\resource\\work");
- rtcParam.setLanguage(IRtcBuilderConstantsPython.LANG_PYTHON);
- rtcParam.setLanguageArg(IRtcBuilderConstantsPython.LANG_PYTHON_ARG);
- rtcParam.setName("test");
- rtcParam.setDescription("test component");
- rtcParam.setVersion("1.0.0");
- rtcParam.setVender("S.Kurihara");
- rtcParam.setCategory("sample");
- rtcParam.setComponentType("STATIC");
- rtcParam.setActivityType("PERIODIC");
- rtcParam.setMaxInstance(1);
- rtcParam.setRtmVersion("0.4.2");
-
- ServicePortParam service1 = new ServicePortParam("MySVPro0",0);
- List<ServicePortInterfaceParam> srvinterts = new ArrayList<ServicePortInterfaceParam>();
- ServicePortInterfaceParam int1 = new ServicePortInterfaceParam(service1, "myservice0", "", "",
- rootPath + "\\resource\\Python\\diffname\\MyService3.idl", "MyService", "", 0);
- srvinterts.add(int1);
- service1.getServicePortInterfaces().addAll(srvinterts);
- List<ServicePortParam> srvports = new ArrayList<ServicePortParam>();
- srvports.add(service1);
- rtcParam.getServicePorts().addAll(srvports);
- genParam.getRtcParams().add(rtcParam);
-
- Generator generator = new Generator();
- GenerateManager manager = new PythonGenerateManager();
- generator.addGenerateManager(manager);
- List<GeneratedResult> result = generator.generateTemplateCode(genParam);
-
- String resourceDir = rootPath + "\\resource\\Python\\diffname\\";
-
- checkCode(result, resourceDir, "test.py");
- checkCode(result, resourceDir, "MyService3_idl.py");
- checkCode(result, resourceDir, "_GlobalIDL/__init__.py");
- checkCode(result, resourceDir, "_GlobalIDL__POA/__init__.py");
- checkCode(result, resourceDir, "MyService3_idl_example.py");
- checkCode(result, resourceDir, "README.test");
- }
-}
Deleted: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/LuckTest.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/LuckTest.java 2012-02-07 14:48:47 UTC (rev 258)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/LuckTest.java 2012-02-10 16:57:54 UTC (rev 259)
@@ -1,443 +0,0 @@
-package jp.go.aist.rtm.rtcbuilder.python._test;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import jp.go.aist.rtm.rtcbuilder.Generator;
-import jp.go.aist.rtm.rtcbuilder.generator.param.DataPortParam;
-import jp.go.aist.rtm.rtcbuilder.generator.param.GeneratorParam;
-import jp.go.aist.rtm.rtcbuilder.generator.param.RtcParam;
-import jp.go.aist.rtm.rtcbuilder.generator.param.ServicePortInterfaceParam;
-import jp.go.aist.rtm.rtcbuilder.generator.param.ServicePortParam;
-import jp.go.aist.rtm.rtcbuilder.manager.GenerateManager;
-import jp.go.aist.rtm.rtcbuilder.python.IRtcBuilderConstantsPython;
-import jp.go.aist.rtm.rtcbuilder.python.manager.PythonGenerateManager;
-
-public class LuckTest extends TestBase {
-
- protected void setUp() throws Exception {
- }
-
- public void testConsumerNoType() throws Exception{
- GeneratorParam genParam = new GeneratorParam();
- RtcParam rtcParam = new RtcParam(genParam, true);
- rtcParam.setOutputProject(rootPath + "\\resource\\work");
- rtcParam.setLanguage(IRtcBuilderConstantsPython.LANG_PYTHON);
- rtcParam.setLanguageArg(IRtcBuilderConstantsPython.LANG_PYTHON_ARG);
- rtcParam.setName("foo");
- rtcParam.setDescription("test module");
- rtcParam.setVersion("1.0.1");
- rtcParam.setVender("TA");
- rtcParam.setCategory("sample");
- rtcParam.setComponentType("STATIC");
- rtcParam.setActivityType("PERIODIC");
- rtcParam.setMaxInstance(2);
- genParam.getRtcParams().add(rtcParam);
-
- List<DataPortParam> dataInport = new ArrayList<DataPortParam>();
- dataInport.add(new DataPortParam("in1", "RTC::TimedShort", "", 0));
- rtcParam.getInports().addAll(dataInport);
-
- List<DataPortParam> dataOutport = new ArrayList<DataPortParam>();
- dataOutport.add(new DataPortParam("out1", "RTC::TimedLong", "", 0));
- rtcParam.getOutports().addAll(dataOutport);
-
- ServicePortParam service1 = new ServicePortParam("MySVPro",0);
- List<ServicePortInterfaceParam> srvinterts = new ArrayList<ServicePortInterfaceParam>();
- ServicePortInterfaceParam int1 = new ServicePortInterfaceParam(service1, "myservice0", "", "",
- rootPath + "\\resource\\Python\\Exception\\ConNoName\\MyService.idl", "MyService", "", 0);
- srvinterts.add(int1);
- service1.getServicePortInterfaces().addAll(srvinterts);
- List<ServicePortParam> srvports = new ArrayList<ServicePortParam>();
- srvports.add(service1);
-
- ServicePortParam service2 = new ServicePortParam("MyConPro",0);
- List<ServicePortInterfaceParam> srvinterts2 = new ArrayList<ServicePortInterfaceParam>();
- ServicePortInterfaceParam int2 = new ServicePortInterfaceParam(service1, "myservice1", "", "",
- rootPath + "\\resource\\Python\\Exception\\ConNoName\\MyService.idl", "", "", 1);
- srvinterts2.add(int2);
- service2.getServicePortInterfaces().addAll(srvinterts2);
- srvports.add(service2);
-
- rtcParam.getServicePorts().addAll(srvports);
- genParam.getRtcParams().add(rtcParam);
-
- Generator generator = new Generator();
- GenerateManager manager = new PythonGenerateManager();
- generator.addGenerateManager(manager);
- try {
- generator.generateTemplateCode(genParam);
- fail();
- } catch ( Exception ex ) {
- }
- }
-
- public void testConsumerNoName() throws Exception{
- GeneratorParam genParam = new GeneratorParam();
- RtcParam rtcParam = new RtcParam(genParam, true);
- rtcParam.setOutputProject(rootPath + "\\resource\\work");
- rtcParam.setLanguage(IRtcBuilderConstantsPython.LANG_PYTHON);
- rtcParam.setLanguageArg(IRtcBuilderConstantsPython.LANG_PYTHON_ARG);
- rtcParam.setName("foo");
- rtcParam.setDescription("test module");
- rtcParam.setVersion("1.0.1");
- rtcParam.setVender("TA");
- rtcParam.setCategory("sample");
- rtcParam.setComponentType("STATIC");
- rtcParam.setActivityType("PERIODIC");
- rtcParam.setMaxInstance(2);
-
- List<DataPortParam> dataInport = new ArrayList<DataPortParam>();
- dataInport.add(new DataPortParam("in1", "RTC::TimedShort", "", 0));
- rtcParam.getInports().addAll(dataInport);
-
- List<DataPortParam> dataOutport = new ArrayList<DataPortParam>();
- dataOutport.add(new DataPortParam("out1", "RTC::TimedLong", "", 0));
- rtcParam.getOutports().addAll(dataOutport);
-
- ServicePortParam service1 = new ServicePortParam("MySVPro",0);
- List<ServicePortInterfaceParam> srvinterts = new ArrayList<ServicePortInterfaceParam>();
- ServicePortInterfaceParam int1 = new ServicePortInterfaceParam(service1, "myservice0", "", "",
- rootPath + "\\resource\\Python\\Exception\\ConNoName\\MyService.idl", "MyService", "", 0);
- srvinterts.add(int1);
- service1.getServicePortInterfaces().addAll(srvinterts);
- List<ServicePortParam> srvports = new ArrayList<ServicePortParam>();
- srvports.add(service1);
-
- ServicePortParam service2 = new ServicePortParam("MyConPro",0);
- List<ServicePortInterfaceParam> srvinterts2 = new ArrayList<ServicePortInterfaceParam>();
- ServicePortInterfaceParam int2 = new ServicePortInterfaceParam(service1, "", "", "",
- rootPath + "\\resource\\Python\\Exception\\ConNoName\\MyService.idl", "MyService", "", 1);
- srvinterts2.add(int2);
- service2.getServicePortInterfaces().addAll(srvinterts2);
- srvports.add(service2);
-
- rtcParam.getServicePorts().addAll(srvports);
- genParam.getRtcParams().add(rtcParam);
-
- Generator generator = new Generator();
- GenerateManager manager = new PythonGenerateManager();
- generator.addGenerateManager(manager);
- try {
- generator.generateTemplateCode(genParam);
- fail();
- } catch ( Exception ex ) {
- }
- }
-
- public void testConsumerNoPortName() throws Exception{
- GeneratorParam genParam = new GeneratorParam();
- RtcParam rtcParam = new RtcParam(genParam, true);
- rtcParam.setOutputProject(rootPath + "\\resource\\work");
- rtcParam.setLanguage(IRtcBuilderConstantsPython.LANG_PYTHON);
- rtcParam.setLanguageArg(IRtcBuilderConstantsPython.LANG_PYTHON_ARG);
- rtcParam.setName("foo");
- rtcParam.setDescription("test module");
- rtcParam.setVersion("1.0.1");
- rtcParam.setVender("TA");
- rtcParam.setCategory("sample");
- rtcParam.setComponentType("STATIC");
- rtcParam.setActivityType("PERIODIC");
- rtcParam.setMaxInstance(2);
-
- List<DataPortParam> dataInport = new ArrayList<DataPortParam>();
- dataInport.add(new DataPortParam("in1", "RTC::TimedShort", "", 0));
- rtcParam.getInports().addAll(dataInport);
-
- List<DataPortParam> dataOutport = new ArrayList<DataPortParam>();
- dataOutport.add(new DataPortParam("out1", "RTC::TimedLong", "", 0));
- rtcParam.getOutports().addAll(dataOutport);
-
- ServicePortParam service1 = new ServicePortParam("MySVPro",0);
- List<ServicePortInterfaceParam> srvinterts = new ArrayList<ServicePortInterfaceParam>();
- ServicePortInterfaceParam int1 = new ServicePortInterfaceParam(service1, "myservice0", "", "",
- rootPath + "\\resource\\Python\\Exception\\ConNoPortName\\MyService.idl", "MyService", "", 0);
- srvinterts.add(int1);
- service1.getServicePortInterfaces().addAll(srvinterts);
- List<ServicePortParam> srvports = new ArrayList<ServicePortParam>();
- srvports.add(service1);
-
- ServicePortParam service2 = new ServicePortParam("",0);
- List<ServicePortInterfaceParam> srvinterts2 = new ArrayList<ServicePortInterfaceParam>();
- ServicePortInterfaceParam int2 = new ServicePortInterfaceParam(service1, "myservice1", "", "",
- rootPath + "\\resource\\Python\\Exception\\ConNoPortName\\MyService.idl", "MyService", "", 1);
- srvinterts2.add(int2);
- service2.getServicePortInterfaces().addAll(srvinterts2);
- srvports.add(service2);
-
- rtcParam.getServicePorts().addAll(srvports);
- genParam.getRtcParams().add(rtcParam);
-
- Generator generator = new Generator();
- GenerateManager manager = new PythonGenerateManager();
- generator.addGenerateManager(manager);
- try {
- generator.generateTemplateCode(genParam);
- fail();
- } catch ( Exception ex ) {
- }
- }
-
- public void testProviderNoType() throws Exception{
- GeneratorParam genParam = new GeneratorParam();
- RtcParam rtcParam = new RtcParam(genParam, true);
- rtcParam.setOutputProject(rootPath + "\\resource\\work");
- rtcParam.setLanguage(IRtcBuilderConstantsPython.LANG_PYTHON);
- rtcParam.setLanguageArg(IRtcBuilderConstantsPython.LANG_PYTHON_ARG);
- rtcParam.setName("foo");
- rtcParam.setDescription("test module");
- rtcParam.setVersion("1.0.1");
- rtcParam.setVender("TA");
- rtcParam.setCategory("sample");
- rtcParam.setComponentType("STATIC");
- rtcParam.setActivityType("PERIODIC");
- rtcParam.setMaxInstance(2);
- genParam.getRtcParams().add(rtcParam);
-
- List<DataPortParam> dataInport = new ArrayList<DataPortParam>();
- dataInport.add(new DataPortParam("in1", "RTC::TimedShort", "", 0));
- rtcParam.getInports().addAll(dataInport);
-
- List<DataPortParam> dataOutport = new ArrayList<DataPortParam>();
- dataOutport.add(new DataPortParam("out1", "RTC::TimedLong", "", 0));
- rtcParam.getOutports().addAll(dataOutport);
-
- ServicePortParam service1 = new ServicePortParam("MySVPro",0);
- List<ServicePortInterfaceParam> srvinterts = new ArrayList<ServicePortInterfaceParam>();
- ServicePortInterfaceParam int1 = new ServicePortInterfaceParam(service1, "myservice0", "", "",
- rootPath + "\\resource\\Python\\Exception\\ProNoType\\MyService.idl", "", "", 0);
- srvinterts.add(int1);
- service1.getServicePortInterfaces().addAll(srvinterts);
- List<ServicePortParam> srvports = new ArrayList<ServicePortParam>();
- srvports.add(service1);
- rtcParam.getServicePorts().addAll(srvports);
- genParam.getRtcParams().add(rtcParam);
-
- Generator generator = new Generator();
- GenerateManager manager = new PythonGenerateManager();
- generator.addGenerateManager(manager);
- try {
- generator.generateTemplateCode(genParam);
- fail();
- } catch ( Exception ex ) {
- }
-
- }
-
- public void testProviderNoName() throws Exception{
- GeneratorParam genParam = new GeneratorParam();
- RtcParam rtcParam = new RtcParam(genParam, true);
- rtcParam.setOutputProject(rootPath + "\\resource\\work");
- rtcParam.setLanguage(IRtcBuilderConstantsPython.LANG_PYTHON);
- rtcParam.setLanguageArg(IRtcBuilderConstantsPython.LANG_PYTHON_ARG);
- rtcParam.setName("foo");
- rtcParam.setDescription("test component");
- rtcParam.setVersion("1.0.1");
- rtcParam.setVender("TA");
- rtcParam.setCategory("sample");
- rtcParam.setComponentType("STATIC");
- rtcParam.setActivityType("PERIODIC");
- rtcParam.setMaxInstance(2);
-
- List<DataPortParam> dataInport = new ArrayList<DataPortParam>();
- dataInport.add(new DataPortParam("in1", "RTC::TimedShort", "", 0));
- rtcParam.getInports().addAll(dataInport);
-
- List<DataPortParam> dataOutport = new ArrayList<DataPortParam>();
- dataOutport.add(new DataPortParam("out1", "RTC::TimedLong", "", 0));
- rtcParam.getOutports().addAll(dataOutport);
-
- ServicePortParam service1 = new ServicePortParam("MySVPro",0);
- List<ServicePortInterfaceParam> srvinterts = new ArrayList<ServicePortInterfaceParam>();
- ServicePortInterfaceParam int1 = new ServicePortInterfaceParam(service1, "", "", "",
- rootPath + "\\resource\\Python\\Exception\\ProNoName\\MyService.idl", "MyService", "", 0);
- srvinterts.add(int1);
- service1.getServicePortInterfaces().addAll(srvinterts);
- List<ServicePortParam> srvports = new ArrayList<ServicePortParam>();
- srvports.add(service1);
- rtcParam.getServicePorts().addAll(srvports);
- genParam.getRtcParams().add(rtcParam);
-
- Generator generator = new Generator();
- GenerateManager manager = new PythonGenerateManager();
- generator.addGenerateManager(manager);
- try {
- generator.generateTemplateCode(genParam);
- fail();
- } catch ( Exception ex ) {
- }
- }
-
- public void testProviderNoPortName() throws Exception{
- GeneratorParam genParam = new GeneratorParam();
- RtcParam rtcParam = new RtcParam(genParam, true);
- rtcParam.setOutputProject(rootPath + "\\resource\\work");
- rtcParam.setLanguage(IRtcBuilderConstantsPython.LANG_PYTHON);
- rtcParam.setLanguageArg(IRtcBuilderConstantsPython.LANG_PYTHON_ARG);
- rtcParam.setName("foo");
- rtcParam.setDescription("test component");
- rtcParam.setVersion("1.0.1");
- rtcParam.setVender("TA");
- rtcParam.setCategory("sample");
- rtcParam.setComponentType("STATIC");
- rtcParam.setActivityType("PERIODIC");
- rtcParam.setMaxInstance(2);
-
- List<DataPortParam> dataInport = new ArrayList<DataPortParam>();
- dataInport.add(new DataPortParam("in1", "RTC::TimedShort", "", 0));
- rtcParam.getInports().addAll(dataInport);
-
- List<DataPortParam> dataOutport = new ArrayList<DataPortParam>();
- dataOutport.add(new DataPortParam("out1", "RTC::TimedLong", "", 0));
- rtcParam.getOutports().addAll(dataOutport);
-
- ServicePortParam service1 = new ServicePortParam("",0);
- List<ServicePortInterfaceParam> srvinterts = new ArrayList<ServicePortInterfaceParam>();
- ServicePortInterfaceParam int1 = new ServicePortInterfaceParam(service1, "myservice0", "", "",
- rootPath + "\\resource\\Python\\Exception\\ProNoPortName\\MyService.idl", "MyService", "", 0);
- srvinterts.add(int1);
- service1.getServicePortInterfaces().addAll(srvinterts);
- List<ServicePortParam> srvports = new ArrayList<ServicePortParam>();
- srvports.add(service1);
- rtcParam.getServicePorts().addAll(srvports);
- genParam.getRtcParams().add(rtcParam);
-
- Generator generator = new Generator();
- GenerateManager manager = new PythonGenerateManager();
- generator.addGenerateManager(manager);
- try {
- generator.generateTemplateCode(genParam);
- fail();
- } catch ( Exception ex ) {
- }
- }
-
- public void testOutPortNoType() throws Exception{
- GeneratorParam genParam = new GeneratorParam();
- RtcParam rtcParam = new RtcParam(genParam, true);
- rtcParam.setOutputProject(rootPath + "\\resource\\work");
- rtcParam.setLanguage(IRtcBuilderConstantsPython.LANG_PYTHON);
- rtcParam.setLanguageArg(IRtcBuilderConstantsPython.LANG_PYTHON_ARG);
- rtcParam.setName("foo");
- rtcParam.setDescription("test component");
- rtcParam.setVersion("1.0.1");
- rtcParam.setVender("TA");
- rtcParam.setCategory("sample");
- rtcParam.setComponentType("STATIC");
- rtcParam.setActivityType("PERIODIC");
- rtcParam.setMaxInstance(2);
- genParam.getRtcParams().add(rtcParam);
-
- List<DataPortParam> dataInport = new ArrayList<DataPortParam>();
- dataInport.add(new DataPortParam("in1", "RTC::TimedShort", "", 0));
- rtcParam.getInports().addAll(dataInport);
-
- List<DataPortParam> dataOutport = new ArrayList<DataPortParam>();
- dataOutport.add(new DataPortParam("out1", "", "", 0));
- rtcParam.getOutports().addAll(dataOutport);
-
- Generator generator = new Generator();
- GenerateManager manager = new PythonGenerateManager();
- generator.addGenerateManager(manager);
- try {
- generator.generateTemplateCode(genParam);
- fail();
- } catch ( Exception ex ) {
- }
- }
-
- public void testOutPortNoName() throws Exception{
- GeneratorParam genParam = new GeneratorParam();
- RtcParam rtcParam = new RtcParam(genParam, true);
- rtcParam.setOutputProject(rootPath + "\\resource\\work");
- rtcParam.setLanguage(IRtcBuilderConstantsPython.LANG_PYTHON);
- rtcParam.setLanguageArg(IRtcBuilderConstantsPython.LANG_PYTHON_ARG);
- rtcParam.setName("foo");
- rtcParam.setDescription("test component");
- rtcParam.setVersion("1.0.1");
- rtcParam.setVender("TA");
- rtcParam.setCategory("sample");
- rtcParam.setComponentType("STATIC");
- rtcParam.setActivityType("PERIODIC");
- rtcParam.setMaxInstance(2);
- genParam.getRtcParams().add(rtcParam);
-
- List<DataPortParam> dataInport = new ArrayList<DataPortParam>();
- dataInport.add(new DataPortParam("in1", "RTC::TimedShort", "", 0));
- rtcParam.getInports().addAll(dataInport);
-
- List<DataPortParam> dataOutport = new ArrayList<DataPortParam>();
- dataOutport.add(new DataPortParam("", "RTC::TimedLong", "", 0));
- rtcParam.getOutports().addAll(dataOutport);
-
- Generator generator = new Generator();
- GenerateManager manager = new PythonGenerateManager();
- generator.addGenerateManager(manager);
- try {
- generator.generateTemplateCode(genParam);
- fail();
- } catch ( Exception ex ) {
- }
- }
-
- public void testInPortNoType() throws Exception{
- GeneratorParam genParam = new GeneratorParam();
- RtcParam rtcParam = new RtcParam(genParam, true);
- rtcParam.setOutputProject(rootPath + "\\resource\\work");
- rtcParam.setLanguage(IRtcBuilderConstantsPython.LANG_PYTHON);
- rtcParam.setLanguageArg(IRtcBuilderConstantsPython.LANG_PYTHON_ARG);
- rtcParam.setName("foo");
- rtcParam.setDescription("test component");
- rtcParam.setVersion("1.0.1");
- rtcParam.setVender("TA");
- rtcParam.setCategory("sample");
- rtcParam.setComponentType("STATIC");
- rtcParam.setActivityType("PERIODIC");
- rtcParam.setMaxInstance(2);
- genParam.getRtcParams().add(rtcParam);
-
- List<DataPortParam> dataport = new ArrayList<DataPortParam>();
- dataport.add(new DataPortParam("in1", "", "", 0));
- rtcParam.getInports().addAll(dataport);
-
- Generator generator = new Generator();
- GenerateManager manager = new PythonGenerateManager();
- generator.addGenerateManager(manager);
- try {
- generator.generateTemplateCode(genParam);
- fail();
- } catch ( Exception ex ) {
- }
- }
-
- public void testInPortNoName() throws Exception{
- GeneratorParam genParam = new GeneratorParam();
- RtcParam rtcParam = new RtcParam(genParam, true);
- rtcParam.setOutputProject(rootPath + "\\resource\\work");
- rtcParam.setLanguage(IRtcBuilderConstantsPython.LANG_PYTHON);
- rtcParam.setLanguageArg(IRtcBuilderConstantsPython.LANG_PYTHON_ARG);
- rtcParam.setName("foo");
- rtcParam.setDescription("test component");
- rtcParam.setVersion("1.0.1");
- rtcParam.setVender("TA");
- rtcParam.setCategory("sample");
- rtcParam.setComponentType("STATIC");
- rtcParam.setActivityType("PERIODIC");
- rtcParam.setMaxInstance(2);
- genParam.getRtcParams().add(rtcParam);
-
- List<DataPortParam> dataport = new ArrayList<DataPortParam>();
- dataport.add(new DataPortParam("", "RTC::TimedShort", "", 0));
- rtcParam.getInports().addAll(dataport);
-
- Generator generator = new Generator();
- GenerateManager manager = new PythonGenerateManager();
- generator.addGenerateManager(manager);
- try {
- generator.generateTemplateCode(genParam);
- fail();
- } catch ( Exception ex ) {
- }
- }
-
-}
Deleted: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/MultiTest.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/MultiTest.java 2012-02-07 14:48:47 UTC (rev 258)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/MultiTest.java 2012-02-10 16:57:54 UTC (rev 259)
@@ -1,216 +0,0 @@
-package jp.go.aist.rtm.rtcbuilder.python._test;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import jp.go.aist.rtm.rtcbuilder.Generator;
-import jp.go.aist.rtm.rtcbuilder.generator.GeneratedResult;
-import jp.go.aist.rtm.rtcbuilder.generator.param.DataPortParam;
-import jp.go.aist.rtm.rtcbuilder.generator.param.GeneratorParam;
-import jp.go.aist.rtm.rtcbuilder.generator.param.RtcParam;
-import jp.go.aist.rtm.rtcbuilder.generator.param.ServicePortInterfaceParam;
-import jp.go.aist.rtm.rtcbuilder.generator.param.ServicePortParam;
-import jp.go.aist.rtm.rtcbuilder.manager.GenerateManager;
-import jp.go.aist.rtm.rtcbuilder.python.IRtcBuilderConstantsPython;
-import jp.go.aist.rtm.rtcbuilder.python.manager.PythonGenerateManager;
-
-public class MultiTest extends TestBase {
-
- protected void setUp() throws Exception {
- }
-
- public void testProConMulti() throws Exception{
- GeneratorParam genParam = new GeneratorParam();
- RtcParam rtcParam = new RtcParam(genParam, true);
- rtcParam.setOutputProject(rootPath + "\\resource\\work");
- rtcParam.setLanguage(IRtcBuilderConstantsPython.LANG_PYTHON);
- rtcParam.setLanguageArg(IRtcBuilderConstantsPython.LANG_PYTHON_ARG);
- rtcParam.setName("foo");
- rtcParam.setDescription("test module");
- rtcParam.setVersion("1.0.1");
- rtcParam.setVender("TA");
- rtcParam.setCategory("sample");
- rtcParam.setComponentType("STATIC");
- rtcParam.setActivityType("PERIODIC");
- rtcParam.setMaxInstance(2);
- rtcParam.setRtmVersion("0.4.2");
-
- List<DataPortParam> dataInport = new ArrayList<DataPortParam>();
- dataInport.add(new DataPortParam("in1", "RTC::TimedShort", "", 0));
- rtcParam.getInports().addAll(dataInport);
-
- List<DataPortParam> dataOutport = new ArrayList<DataPortParam>();
- dataOutport.add(new DataPortParam("out1", "RTC::TimedLong", "", 0));
- rtcParam.getOutports().addAll(dataOutport);
-
- ServicePortParam service1 = new ServicePortParam("MySVPro",0);
- List<ServicePortInterfaceParam> srvinterts = new ArrayList<ServicePortInterfaceParam>();
- ServicePortInterfaceParam int1 = new ServicePortInterfaceParam(service1, "myserviceP1", "", "",
- rootPath + "resource\\Python\\Multi\\MyService.idl", "MyService", "", 0);
- srvinterts.add(int1);
- service1.getServicePortInterfaces().addAll(srvinterts);
- List<ServicePortParam> srvports = new ArrayList<ServicePortParam>();
- srvports.add(service1);
-
- ServicePortParam service2 = new ServicePortParam("MySVPro2",0);
- List<ServicePortInterfaceParam> srvinterts2 = new ArrayList<ServicePortInterfaceParam>();
- ServicePortInterfaceParam int2 = new ServicePortInterfaceParam(service1, "myserviceP2", "", "",
- rootPath + "resource\\Python\\Multi\\MyService2.idl", "MyService2", "", 0);
- srvinterts2.add(int2);
- service2.getServicePortInterfaces().addAll(srvinterts2);
- srvports.add(service2);
-
- ServicePortParam service3 = new ServicePortParam("MyConPro",0);
- List<ServicePortInterfaceParam> srvintert3 = new ArrayList<ServicePortInterfaceParam>();
- ServicePortInterfaceParam int3 = new ServicePortInterfaceParam(service1, "myservice0", "", "",
- rootPath + "resource\\Python\\Multi\\MyService.idl", "MyService", "", 1);
- srvintert3.add(int3);
- service3.getServicePortInterfaces().addAll(srvintert3);
- srvports.add(service3);
-
- ServicePortParam service4 = new ServicePortParam("MyConPro2",0);
- List<ServicePortInterfaceParam> srvinterts4 = new ArrayList<ServicePortInterfaceParam>();
- ServicePortInterfaceParam int4 = new ServicePortInterfaceParam(service1, "myservice2", "", "",
- rootPath + "resource\\Python\\Multi\\DAQService.idl", "DAQService", "", 1);
- srvinterts4.add(int4);
- service4.getServicePortInterfaces().addAll(srvinterts4);
- srvports.add(service4);
- rtcParam.getServicePorts().addAll(srvports);
- genParam.getRtcParams().add(rtcParam);
-
- Generator generator = new Generator();
- GenerateManager manager = new PythonGenerateManager();
- generator.addGenerateManager(manager);
- List<GeneratedResult> result = generator.generateTemplateCode(genParam);
-
- String resourceDir = rootPath + "\\resource\\Python\\Multi\\ProConMulti\\";
-
- checkCode(result, resourceDir, "foo.py");
- checkCode(result, resourceDir, "MyService_idl.py");
- checkCode(result, resourceDir, "MyService2_idl.py");
- checkCode(result, resourceDir, "DAQService_idl.py");
- checkCode(result, resourceDir, "_GlobalIDL/__init__.py");
- checkCode(result, resourceDir, "_GlobalIDL__POA/__init__.py");
- checkCode(result, resourceDir, "MyService_idl_example.py");
- checkCode(result, resourceDir, "MyService2_idl_example.py");
- checkCode(result, resourceDir, "README.foo");
- }
-
- public void testConsumerMulti() throws Exception{
- GeneratorParam genParam = new GeneratorParam();
- RtcParam rtcParam = new RtcParam(genParam, true);
- rtcParam.setOutputProject(rootPath + "\\resource\\work");
- rtcParam.setLanguage(IRtcBuilderConstantsPython.LANG_PYTHON);
- rtcParam.setLanguageArg(IRtcBuilderConstantsPython.LANG_PYTHON_ARG);
- rtcParam.setName("foo");
- rtcParam.setDescription("test module");
- rtcParam.setVersion("1.0.1");
- rtcParam.setVender("TA");
- rtcParam.setCategory("sample");
- rtcParam.setComponentType("STATIC");
- rtcParam.setActivityType("PERIODIC");
- rtcParam.setMaxInstance(2);
- rtcParam.setRtmVersion("0.4.2");
-
- List<DataPortParam> dataInport = new ArrayList<DataPortParam>();
- dataInport.add(new DataPortParam("in", "RTC::TimedShort", "", 0));
- rtcParam.getInports().addAll(dataInport);
-
- List<DataPortParam> dataOutport = new ArrayList<DataPortParam>();
- dataOutport.add(new DataPortParam("out", "RTC::TimedLong", "", 0));
- rtcParam.getOutports().addAll(dataOutport);
-
- ServicePortParam service1 = new ServicePortParam("MyConPro",0);
- List<ServicePortInterfaceParam> srvinterts = new ArrayList<ServicePortInterfaceParam>();
- ServicePortInterfaceParam int1 = new ServicePortInterfaceParam(service1, "myservice0", "", "",
- rootPath + "resource\\Python\\Multi\\MyService.idl", "MyService", "", 1);
- srvinterts.add(int1);
- service1.getServicePortInterfaces().addAll(srvinterts);
- List<ServicePortParam> srvports = new ArrayList<ServicePortParam>();
- srvports.add(service1);
-
- ServicePortParam service2 = new ServicePortParam("MyConPro2",0);
- List<ServicePortInterfaceParam> srvinterts2 = new ArrayList<ServicePortInterfaceParam>();
- ServicePortInterfaceParam int2 = new ServicePortInterfaceParam(service1, "myservice2", "", "",
- rootPath + "resource\\Python\\Multi\\DAQService.idl", "DAQService", "", 1);
- srvinterts2.add(int2);
- service2.getServicePortInterfaces().addAll(srvinterts2);
- srvports.add(service2);
- rtcParam.getServicePorts().addAll(srvports);
- genParam.getRtcParams().add(rtcParam);
-
- Generator generator = new Generator();
- GenerateManager manager = new PythonGenerateManager();
- generator.addGenerateManager(manager);
- List<GeneratedResult> result = generator.generateTemplateCode(genParam);
-
- String resourceDir = rootPath + "\\resource\\Python\\Multi\\ConMulti\\";
-
- checkCode(result, resourceDir, "foo.py");
- checkCode(result, resourceDir, "MyService_idl.py");
- checkCode(result, resourceDir, "DAQService_idl.py");
- checkCode(result, resourceDir, "_GlobalIDL/__init__.py");
- checkCode(result, resourceDir, "_GlobalIDL__POA/__init__.py");
- checkCode(result, resourceDir, "README.foo");
- }
-
- public void testProviderMulti() throws Exception{
- GeneratorParam genParam = new GeneratorParam();
- RtcParam rtcParam = new RtcParam(genParam, true);
- rtcParam.setOutputProject(rootPath + "\\resource\\work");
- rtcParam.setLanguage(IRtcBuilderConstantsPython.LANG_PYTHON);
- rtcParam.setLanguageArg(IRtcBuilderConstantsPython.LANG_PYTHON_ARG);
- rtcParam.setName("foo");
- rtcParam.setDescription("test component");
- rtcParam.setVersion("1.0.1");
- rtcParam.setVender("TA");
- rtcParam.setCategory("sample");
- rtcParam.setComponentType("STATIC");
- rtcParam.setActivityType("PERIODIC");
- rtcParam.setMaxInstance(2);
- rtcParam.setRtmVersion("0.4.2");
-
- List<DataPortParam> dataInport = new ArrayList<DataPortParam>();
- dataInport.add(new DataPortParam("in1", "RTC::TimedShort", "", 0));
- rtcParam.getInports().addAll(dataInport);
-
- List<DataPortParam> dataOutport = new ArrayList<DataPortParam>();
- dataOutport.add(new DataPortParam("out1", "RTC::TimedLong", "", 0));
- rtcParam.getOutports().addAll(dataOutport);
-
- ServicePortParam service1 = new ServicePortParam("MySVPro",0);
- List<ServicePortInterfaceParam> srvinterts = new ArrayList<ServicePortInterfaceParam>();
- ServicePortInterfaceParam int1 = new ServicePortInterfaceParam(service1, "myservice0", "", "",
- rootPath + "resource\\Python\\Multi\\MyService.idl", "MyService", "", 0);
- srvinterts.add(int1);
- service1.getServicePortInterfaces().addAll(srvinterts);
- List<ServicePortParam> srvports = new ArrayList<ServicePortParam>();
- srvports.add(service1);
-
- ServicePortParam service2 = new ServicePortParam("MySVPro2",0);
- List<ServicePortInterfaceParam> srvinterts2 = new ArrayList<ServicePortInterfaceParam>();
- ServicePortInterfaceParam int2 = new ServicePortInterfaceParam(service1, "myservice2", "", "",
- rootPath + "resource\\Python\\Multi\\DAQService.idl", "DAQService", "", 0);
- srvinterts2.add(int2);
- service2.getServicePortInterfaces().addAll(srvinterts2);
- srvports.add(service2);
- rtcParam.getServicePorts().addAll(srvports);
- genParam.getRtcParams().add(rtcParam);
-
- Generator generator = new Generator();
- GenerateManager manager = new PythonGenerateManager();
- generator.addGenerateManager(manager);
- List<GeneratedResult> result = generator.generateTemplateCode(genParam);
-
- String resourceDir = rootPath + "\\resource\\Python\\Multi\\ProMulti\\";
-
- checkCode(result, resourceDir, "foo.py");
- checkCode(result, resourceDir, "MyService_idl.py");
- checkCode(result, resourceDir, "DAQService_idl.py");
- checkCode(result, resourceDir, "_GlobalIDL/__init__.py");
- checkCode(result, resourceDir, "_GlobalIDL__POA/__init__.py");
- checkCode(result, resourceDir, "MyService_idl_example.py");
- checkCode(result, resourceDir, "DAQService_idl_example.py");
- checkCode(result, resourceDir, "README.foo");
- }
-}
Deleted: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/PyDocLongTest.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/PyDocLongTest.java 2012-02-07 14:48:47 UTC (rev 258)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/PyDocLongTest.java 2012-02-10 16:57:54 UTC (rev 259)
@@ -1,238 +0,0 @@
-package jp.go.aist.rtm.rtcbuilder.python._test;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import jp.go.aist.rtm.rtcbuilder.Generator;
-import jp.go.aist.rtm.rtcbuilder.IRtcBuilderConstants;
-import jp.go.aist.rtm.rtcbuilder.generator.GeneratedResult;
-import jp.go.aist.rtm.rtcbuilder.generator.param.ConfigSetParam;
-import jp.go.aist.rtm.rtcbuilder.generator.param.DataPortParam;
-import jp.go.aist.rtm.rtcbuilder.generator.param.GeneratorParam;
-import jp.go.aist.rtm.rtcbuilder.generator.param.RtcParam;
-import jp.go.aist.rtm.rtcbuilder.generator.param.ServicePortInterfaceParam;
-import jp.go.aist.rtm.rtcbuilder.generator.param.ServicePortParam;
-import jp.go.aist.rtm.rtcbuilder.manager.GenerateManager;
-import jp.go.aist.rtm.rtcbuilder.python.IRtcBuilderConstantsPython;
-import jp.go.aist.rtm.rtcbuilder.python.manager.PythonGenerateManager;
-
-public class PyDocLongTest extends TestBase {
-
- protected void setUp() throws Exception {
- }
-
- public void testDocAllLong() throws Exception{
- GeneratorParam genParam = new GeneratorParam();
- RtcParam rtcParam = new RtcParam(genParam, true);
- rtcParam.setOutputProject(rootPath + "\\resource\\work");
- rtcParam.setLanguage(IRtcBuilderConstantsPython.LANG_PYTHON);
- rtcParam.setLanguageArg(IRtcBuilderConstantsPython.LANG_PYTHON_ARG);
- rtcParam.setName("foo");
- rtcParam.setDescription("MDesc");
- rtcParam.setVersion("1.0.1");
- rtcParam.setVender("TA");
- rtcParam.setCategory("Manip");
- rtcParam.setComponentType("STATIC2");
- rtcParam.setActivityType("PERIODIC2");
- rtcParam.setMaxInstance(5);
- rtcParam.setRtmVersion("0.4.2");
- //
- rtcParam.setDocCreator("Noriaki Ando <n-ando at aist.go.jp>34567894123456789512345678961234567897123456789812345");
- rtcParam.setDocLicense("Copyright (C) 2006-2008 ライセンス12345678901234567890123456789012345678901234567890");
- rtcParam.setDocDescription("本コンポーネントの概要説明1234567890123456789012345678901234567890123456789012345678901234567890");
- rtcParam.setDocInOut("本コンポーネントの入出力1234567890123456789012345678901234567890123456789012345678901234567890");
- rtcParam.setDocAlgorithm("本コンポーネントのアルゴリズムなど1234567890123456789012345678901234567890123456789012345678901234567890");
- rtcParam.setDocReference("参考文献の情報1234567890123456789012345678901234567890123456789012345678901234567890");
- //
- rtcParam.setDocActionOverView(IRtcBuilderConstants.ACTIVITY_INITIALIZE, "on_initialize概要説明1234567890123456789012345678901234567890123456789012345678901234567890");
- rtcParam.setDocActionPreCondition(IRtcBuilderConstants.ACTIVITY_INITIALIZE, "on_initialize事前条件1234567890123456789012345678901234567890123456789012345678901234567890");
- rtcParam.setDocActionPostCondition(IRtcBuilderConstants.ACTIVITY_INITIALIZE, "on_initialize事後条件1234567890123456789012345678901234567890123456789012345678901234567890");
- //
- rtcParam.setDocActionOverView(IRtcBuilderConstants.ACTIVITY_FINALIZE, "on_finalize概要説明1234567890123456789012345678901234567890123456789012345678901234567890");
- rtcParam.setDocActionPreCondition(IRtcBuilderConstants.ACTIVITY_FINALIZE, "on_finalize事前条件1234567890123456789012345678901234567890123456789012345678901234567890");
- rtcParam.setDocActionPostCondition(IRtcBuilderConstants.ACTIVITY_FINALIZE, "on_finalize事後条件1234567890123456789012345678901234567890123456789012345678901234567890");
- //
- rtcParam.setDocActionOverView(IRtcBuilderConstants.ACTIVITY_STARTUP, "on_startup概要説明1234567890123456789012345678901234567890123456789012345678901234567890");
- rtcParam.setDocActionPreCondition(IRtcBuilderConstants.ACTIVITY_STARTUP, "on_startup事前条件1234567890123456789012345678901234567890123456789012345678901234567890");
- rtcParam.setDocActionPostCondition(IRtcBuilderConstants.ACTIVITY_STARTUP, "on_startup事後条件1234567890123456789012345678901234567890123456789012345678901234567890");
- //
- rtcParam.setDocActionOverView(IRtcBuilderConstants.ACTIVITY_SHUTDOWN, "on_shutdown概要説明1234567890123456789012345678901234567890123456789012345678901234567890");
- rtcParam.setDocActionPreCondition(IRtcBuilderConstants.ACTIVITY_SHUTDOWN, "on_shutdown事前条件1234567890123456789012345678901234567890123456789012345678901234567890");
- rtcParam.setDocActionPostCondition(IRtcBuilderConstants.ACTIVITY_SHUTDOWN, "on_shutdown事後条件1234567890123456789012345678901234567890123456789012345678901234567890");
- //
- rtcParam.setDocActionOverView(IRtcBuilderConstants.ACTIVITY_ACTIVATED, "on_activated概要説明1234567890123456789012345678901234567890123456789012345678901234567890");
- rtcParam.setDocActionPreCondition(IRtcBuilderConstants.ACTIVITY_ACTIVATED, "on_activated事前条件1234567890123456789012345678901234567890123456789012345678901234567890");
- rtcParam.setDocActionPostCondition(IRtcBuilderConstants.ACTIVITY_ACTIVATED, "on_activated事後条件1234567890123456789012345678901234567890123456789012345678901234567890");
- //
- rtcParam.setDocActionOverView(IRtcBuilderConstants.ACTIVITY_DEACTIVATED, "on_deactivated概要説明1234567890123456789012345678901234567890123456789012345678901234567890");
- rtcParam.setDocActionPreCondition(IRtcBuilderConstants.ACTIVITY_DEACTIVATED, "on_deactivated事前条件1234567890123456789012345678901234567890123456789012345678901234567890");
- rtcParam.setDocActionPostCondition(IRtcBuilderConstants.ACTIVITY_DEACTIVATED, "on_deactivated事後条件1234567890123456789012345678901234567890123456789012345678901234567890");
- //
- rtcParam.setDocActionOverView(IRtcBuilderConstants.ACTIVITY_EXECUTE, "on_execute概要説明1234567890123456789012345678901234567890123456789012345678901234567890");
- rtcParam.setDocActionPreCondition(IRtcBuilderConstants.ACTIVITY_EXECUTE, "on_execute事前条件1234567890123456789012345678901234567890123456789012345678901234567890");
- rtcParam.setDocActionPostCondition(IRtcBuilderConstants.ACTIVITY_EXECUTE, "on_execute事後条件1234567890123456789012345678901234567890123456789012345678901234567890");
- //
- rtcParam.setDocActionOverView(IRtcBuilderConstants.ACTIVITY_ABORTING, "on_aborting概要説明1234567890123456789012345678901234567890123456789012345678901234567890");
- rtcParam.setDocActionPreCondition(IRtcBuilderConstants.ACTIVITY_ABORTING, "on_aborting事前条件1234567890123456789012345678901234567890123456789012345678901234567890");
- rtcParam.setDocActionPostCondition(IRtcBuilderConstants.ACTIVITY_ABORTING, "on_aborting事後条件1234567890123456789012345678901234567890123456789012345678901234567890");
- //
- rtcParam.setDocActionOverView(IRtcBuilderConstants.ACTIVITY_ERROR, "on_error概要説明1234567890123456789012345678901234567890123456789012345678901234567890");
- rtcParam.setDocActionPreCondition(IRtcBuilderConstants.ACTIVITY_ERROR, "on_error事前条件1234567890123456789012345678901234567890123456789012345678901234567890");
- rtcParam.setDocActionPostCondition(IRtcBuilderConstants.ACTIVITY_ERROR, "on_error事後条件1234567890123456789012345678901234567890123456789012345678901234567890");
- //
- rtcParam.setDocActionOverView(IRtcBuilderConstants.ACTIVITY_RESET, "on_reset概要説明1234567890123456789012345678901234567890123456789012345678901234567890");
- rtcParam.setDocActionPreCondition(IRtcBuilderConstants.ACTIVITY_RESET, "on_reset事前条件1234567890123456789012345678901234567890123456789012345678901234567890");
- rtcParam.setDocActionPostCondition(IRtcBuilderConstants.ACTIVITY_RESET, "on_reset事後条件1234567890123456789012345678901234567890123456789012345678901234567890");
- //
- rtcParam.setDocActionOverView(IRtcBuilderConstants.ACTIVITY_STATE_UPDATE, "on_state_update概要説明1234567890123456789012345678901234567890123456789012345678901234567890");
- rtcParam.setDocActionPreCondition(IRtcBuilderConstants.ACTIVITY_STATE_UPDATE, "on_state_update事前条件1234567890123456789012345678901234567890123456789012345678901234567890");
- rtcParam.setDocActionPostCondition(IRtcBuilderConstants.ACTIVITY_STATE_UPDATE, "on_state_update事後条件1234567890123456789012345678901234567890123456789012345678901234567890");
- //
- rtcParam.setDocActionOverView(IRtcBuilderConstants.ACTIVITY_RATE_CHANGED, "on_rate_changed概要説明1234567890123456789012345678901234567890123456789012345678901234567890");
- rtcParam.setDocActionPreCondition(IRtcBuilderConstants.ACTIVITY_RATE_CHANGED, "on_rate_changed事前条件1234567890123456789012345678901234567890123456789012345678901234567890");
- rtcParam.setDocActionPostCondition(IRtcBuilderConstants.ACTIVITY_RATE_CHANGED, "on_rate_changed事後条件1234567890123456789012345678901234567890123456789012345678901234567890");
- //
- genParam.getRtcParams().add(rtcParam);
- List<DataPortParam> dataport = new ArrayList<DataPortParam>();
-
- DataPortParam datap1 = new DataPortParam("InP1", "RTC::TimedShort", "", 0);
- datap1.setDocDescription("InPort1の概要1234567890123456789012345678901234567890123456789012345678901234567890");
- datap1.setDocType("InPort1のデータの型1234567890123456789012345678901234567890123456789012345678901234567890");
- datap1.setDocNum("InPort1のデータの数1234567890123456789012345678901234567890123456789012345678901234567890");
- datap1.setDocSemantics("InPort1のデータの意味1234567890123456789012345678901234567890123456789012345678901234567890");
- datap1.setDocUnit("InPort1のデータの単位1234567890123456789012345678901234567890123456789012345678901234567890");
- datap1.setDocOccurrence("InPort1のデータの発生頻度1234567890123456789012345678901234567890123456789012345678901234567890");
- datap1.setDocOperation("InPort1のデータの処理周期1234567890123456789012345678901234567890123456789012345678901234567890");
- dataport.add(datap1);
-
- DataPortParam datap2 = new DataPortParam("InP2", "RTC::TimedLong", "", 0);
- datap2.setDocDescription("InPort2の概要1234567890123456789012345678901234567890123456789012345678901234567890");
- datap2.setDocType("InPort2のデータの型1234567890123456789012345678901234567890123456789012345678901234567890");
- datap2.setDocNum("InPort2のデータの数1234567890123456789012345678901234567890123456789012345678901234567890");
- datap2.setDocSemantics("InPort2のデータの意味1234567890123456789012345678901234567890123456789012345678901234567890");
- datap2.setDocUnit("InPort2のデータの単位1234567890123456789012345678901234567890123456789012345678901234567890");
- datap2.setDocOccurrence("InPort2のデータの発生頻度1234567890123456789012345678901234567890123456789012345678901234567890");
- datap2.setDocOperation("InPort2のデータの処理周期1234567890123456789012345678901234567890123456789012345678901234567890");
- dataport.add(datap2);
-
- rtcParam.getInports().addAll(dataport);
- //
- List<DataPortParam> outport = new ArrayList<DataPortParam>();
-
- DataPortParam datap3 = new DataPortParam("OutP1", "RTC::TimedLong", "", 0);
- datap3.setDocDescription("OutPort1の概要1234567890123456789012345678901234567890123456789012345678901234567890");
- datap3.setDocType("OutPort1のデータの型1234567890123456789012345678901234567890123456789012345678901234567890");
- datap3.setDocNum("OutPort1のデータの数1234567890123456789012345678901234567890123456789012345678901234567890");
- datap3.setDocSemantics("OutPort1のデータの意味1234567890123456789012345678901234567890123456789012345678901234567890");
- datap3.setDocUnit("OutPort1のデータの単位1234567890123456789012345678901234567890123456789012345678901234567890");
- datap3.setDocOccurrence("OutPort1のデータの発生頻度1234567890123456789012345678901234567890123456789012345678901234567890");
- datap3.setDocOperation("OutPort1のデータの処理周期1234567890123456789012345678901234567890123456789012345678901234567890");
- outport.add(datap3);
-
- DataPortParam datap4 = new DataPortParam("OutP2", "RTC::TimedFloat", "", 0);
- datap4.setDocDescription("OutPort2の概要1234567890123456789012345678901234567890123456789012345678901234567890");
- datap4.setDocType("OutPort2のデータの型1234567890123456789012345678901234567890123456789012345678901234567890");
- datap4.setDocNum("OutPort2のデータの数1234567890123456789012345678901234567890123456789012345678901234567890");
- datap4.setDocSemantics("OutPort2のデータの意味1234567890123456789012345678901234567890123456789012345678901234567890");
- datap4.setDocUnit("OutPort2のデータの単位1234567890123456789012345678901234567890123456789012345678901234567890");
- datap4.setDocOccurrence("OutPort2のデータの発生頻度1234567890123456789012345678901234567890123456789012345678901234567890");
- datap4.setDocOperation("OutPort2のデータの処理周期1234567890123456789012345678901234567890123456789012345678901234567890");
- outport.add(datap4);
-
- rtcParam.getOutports().addAll(outport);
-
- ServicePortParam service1 = new ServicePortParam("svPort",0);
- service1.setDocDescription("ServicePort1の概要1234567890123456789012345678901234567890123456789012345678901234567890");
- service1.setDocIfDescription("ServicePort1のインターフェースの概要1234567890123456789012345678901234567890123456789012345678901234567890");
- List<ServicePortInterfaceParam> srvinterts = new ArrayList<ServicePortInterfaceParam>();
- ServicePortInterfaceParam int1 = new ServicePortInterfaceParam(service1, "acc", "", "",
- rootPath + "\\resource\\MyService.idl", "MyService", "", 0);
- int1.setDocDescription("ServiceIF1の概要説明1234567890123456789012345678901234567890123456789012345678901234567890");
- int1.setDocArgument("ServiceIF1の引数1234567890123456789012345678901234567890123456789012345678901234567890");
- int1.setDocReturn("ServiceIF1の返値1234567890123456789012345678901234567890123456789012345678901234567890");
- int1.setDocException("ServiceIF1の例外1234567890123456789012345678901234567890123456789012345678901234567890");
- int1.setDocPreCondition("ServiceIF1の事前条件1234567890123456789012345678901234567890123456789012345678901234567890");
- int1.setDocPostCondition("ServiceIF1の事後条件1234567890123456789012345678901234567890123456789012345678901234567890");
- srvinterts.add(int1);
- service1.getServicePortInterfaces().addAll(srvinterts);
- List<ServicePortParam> srvports = new ArrayList<ServicePortParam>();
- srvports.add(service1);
-
- ServicePortParam service2 = new ServicePortParam("cmPort",0);
- service2.setDocDescription("ServicePort2の概要1234567890123456789012345678901234567890123456789012345678901234567890");
- service2.setDocIfDescription("ServicePort2のインターフェースの概要1234567890123456789012345678901234567890123456789012345678901234567890");
- List<ServicePortInterfaceParam> srvinterts2 = new ArrayList<ServicePortInterfaceParam>();
- ServicePortInterfaceParam int2 = new ServicePortInterfaceParam(service2, "rate", "", "",
- rootPath + "\\resource\\DAQService.idl", "DAQService", "", 1);
- int2.setDocDescription("ServiceIF2の概要説明1234567890123456789012345678901234567890123456789012345678901234567890");
- int2.setDocArgument("ServiceIF2の引数1234567890123456789012345678901234567890123456789012345678901234567890");
- int2.setDocReturn("ServiceIF2の返値1234567890123456789012345678901234567890123456789012345678901234567890");
- int2.setDocException("ServiceIF2の例外1234567890123456789012345678901234567890123456789012345678901234567890");
- int2.setDocPreCondition("ServiceIF2の事前条件1234567890123456789012345678901234567890123456789012345678901234567890");
- int2.setDocPostCondition("ServiceIF2の事後条件1234567890123456789012345678901234567890123456789012345678901234567890");
- srvinterts2.add(int2);
- service2.getServicePortInterfaces().addAll(srvinterts2);
- srvports.add(service2);
-
- List<ConfigSetParam> configset = new ArrayList<ConfigSetParam>();
- ConfigSetParam config1 = new ConfigSetParam("int_param0","int","", "0");
- config1.setDocDataName("Config1の名前");
- config1.setDocDescription("Config1の概要1234567890123456789012345678901234567890123456789012345678901234567890");
- config1.setDocDefaultVal("Config1のデフォルト値");
- config1.setDocUnit("Config1の単位1234567890123456789012345678901234567890123456789012345678901234567890");
- config1.setDocRange("Config1の範囲1234567890123456789012345678901234567890123456789012345678901234567890");
- config1.setDocConstraint("Config1の制約条件1234567890123456789012345678901234567890123456789012345678901234567890");
- configset.add(config1);
- ConfigSetParam config2 = new ConfigSetParam("int_param1","int","", "1");
- config2.setDocDataName("Config2の名前");
- config2.setDocDescription("Config2の概要1234567890123456789012345678901234567890123456789012345678901234567890");
- config2.setDocDefaultVal("Config2のデフォルト値");
- config2.setDocUnit("Config2の単位1234567890123456789012345678901234567890123456789012345678901234567890");
- config2.setDocRange("Config2の範囲1234567890123456789012345678901234567890123456789012345678901234567890");
- config2.setDocConstraint("Config2の制約条件1234567890123456789012345678901234567890123456789012345678901234567890");
- configset.add(config2);
- ConfigSetParam config3 = new ConfigSetParam("double_param0","double","", "0.11");
- config3.setDocDataName("Config3の名前");
- config3.setDocDescription("Config3の概要1234567890123456789012345678901234567890123456789012345678901234567890");
- config3.setDocDefaultVal("Config3のデフォルト値");
- config3.setDocUnit("Config3の単位1234567890123456789012345678901234567890123456789012345678901234567890");
- config3.setDocRange("Config3の範囲1234567890123456789012345678901234567890123456789012345678901234567890");
- config3.setDocConstraint("Config3の制約条件1234567890123456789012345678901234567890123456789012345678901234567890");
- configset.add(config3);
- ConfigSetParam config4 = new ConfigSetParam("str_param0","String","", "日本語");
- config4.setDocDataName("Config4の名前");
- config4.setDocDescription("Config4の概要1234567890123456789012345678901234567890123456789012345678901234567890");
- config4.setDocDefaultVal("Config4のデフォルト値");
- config4.setDocUnit("Config4の単位1234567890123456789012345678901234567890123456789012345678901234567890");
- config4.setDocRange("Config4の範囲1234567890123456789012345678901234567890123456789012345678901234567890");
- config4.setDocConstraint("Config4の制約条件1234567890123456789012345678901234567890123456789012345678901234567890");
- configset.add(config4);
- ConfigSetParam config5 = new ConfigSetParam("str_param1","String","", "dara");
- config5.setDocDataName("Config5の名前");
- config5.setDocDescription("Config5の概要1234567890123456789012345678901234567890123456789012345678901234567890");
- config5.setDocDefaultVal("Config5のデフォルト値");
- config5.setDocUnit("Config5の単位1234567890123456789012345678901234567890123456789012345678901234567890");
- config5.setDocRange("Config5の範囲1234567890123456789012345678901234567890123456789012345678901234567890");
- config5.setDocConstraint("Config5の制約条件1234567890123456789012345678901234567890123456789012345678901234567890");
- configset.add(config5);
- rtcParam.getConfigParams().addAll(configset);
-
- rtcParam.getServicePorts().addAll(srvports);
-
- Generator generator = new Generator();
- GenerateManager manager = new PythonGenerateManager();
- generator.addGenerateManager(manager);
- List<GeneratedResult> result = generator.generateTemplateCode(genParam);
-
- String resourceDir = rootPath + "\\resource\\Python\\Doc\\fullLong\\";
-
- checkCode(result, resourceDir, "foo.py");
- checkCode(result, resourceDir, "MyService_idl.py");
- checkCode(result, resourceDir, "DAQService_idl.py");
- checkCode(result, resourceDir, "_GlobalIDL/__init__.py");
- checkCode(result, resourceDir, "_GlobalIDL__POA/__init__.py");
- checkCode(result, resourceDir, "MyService_idl_example.py");
- checkCode(result, resourceDir, "README.foo");
- }
-
-}
Deleted: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/PyDocTest.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/PyDocTest.java 2012-02-07 14:48:47 UTC (rev 258)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/PyDocTest.java 2012-02-10 16:57:54 UTC (rev 259)
@@ -1,491 +0,0 @@
-package jp.go.aist.rtm.rtcbuilder.python._test;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import jp.go.aist.rtm.rtcbuilder.Generator;
-import jp.go.aist.rtm.rtcbuilder.IRtcBuilderConstants;
-import jp.go.aist.rtm.rtcbuilder.generator.GeneratedResult;
-import jp.go.aist.rtm.rtcbuilder.generator.param.ConfigSetParam;
-import jp.go.aist.rtm.rtcbuilder.generator.param.DataPortParam;
-import jp.go.aist.rtm.rtcbuilder.generator.param.GeneratorParam;
-import jp.go.aist.rtm.rtcbuilder.generator.param.RtcParam;
-import jp.go.aist.rtm.rtcbuilder.generator.param.ServicePortInterfaceParam;
-import jp.go.aist.rtm.rtcbuilder.generator.param.ServicePortParam;
-import jp.go.aist.rtm.rtcbuilder.manager.GenerateManager;
-import jp.go.aist.rtm.rtcbuilder.python.IRtcBuilderConstantsPython;
-import jp.go.aist.rtm.rtcbuilder.python.manager.PythonGenerateManager;
-
-public class PyDocTest extends TestBase {
-
- protected void setUp() throws Exception {
- }
-
- public void testDocAll() throws Exception{
- GeneratorParam genParam = new GeneratorParam();
- RtcParam rtcParam = new RtcParam(genParam, true);
- rtcParam.setOutputProject(rootPath + "\\resource\\work");
- rtcParam.setLanguage(IRtcBuilderConstantsPython.LANG_PYTHON);
- rtcParam.setLanguageArg(IRtcBuilderConstantsPython.LANG_PYTHON_ARG);
- rtcParam.setName("foo");
- rtcParam.setDescription("MDesc");
- rtcParam.setVersion("1.0.1");
- rtcParam.setVender("TA");
- rtcParam.setCategory("Manip");
- rtcParam.setComponentType("STATIC2");
- rtcParam.setActivityType("PERIODIC2");
- rtcParam.setMaxInstance(5);
- rtcParam.setRtmVersion("0.4.2");
- //
- rtcParam.setDocCreator("Noriaki Ando <n-ando at aist.go.jp>");
- rtcParam.setDocLicense("Copyright (C) 2006-2008 ライセンス");
- rtcParam.setDocDescription("本コンポーネントの概要説明");
- rtcParam.setDocInOut("本コンポーネントの入出力");
- rtcParam.setDocAlgorithm("本コンポーネントのアルゴリズムなど");
- rtcParam.setDocReference("参考文献の情報");
- //
- rtcParam.setDocActionOverView(IRtcBuilderConstants.ACTIVITY_INITIALIZE, "on_initialize概要説明");
- rtcParam.setDocActionPreCondition(IRtcBuilderConstants.ACTIVITY_INITIALIZE, "on_initialize事前条件");
- rtcParam.setDocActionPostCondition(IRtcBuilderConstants.ACTIVITY_INITIALIZE, "on_initialize事後条件");
- //
- rtcParam.setDocActionOverView(IRtcBuilderConstants.ACTIVITY_FINALIZE, "on_finalize概要説明");
- rtcParam.setDocActionPreCondition(IRtcBuilderConstants.ACTIVITY_FINALIZE, "on_finalize事前条件");
- rtcParam.setDocActionPostCondition(IRtcBuilderConstants.ACTIVITY_FINALIZE, "on_finalize事後条件");
- //
- rtcParam.setDocActionOverView(IRtcBuilderConstants.ACTIVITY_STARTUP, "on_startup概要説明");
- rtcParam.setDocActionPreCondition(IRtcBuilderConstants.ACTIVITY_STARTUP, "on_startup事前条件");
- rtcParam.setDocActionPostCondition(IRtcBuilderConstants.ACTIVITY_STARTUP, "on_startup事後条件");
- //
- rtcParam.setDocActionOverView(IRtcBuilderConstants.ACTIVITY_SHUTDOWN, "on_shutdown概要説明");
- rtcParam.setDocActionPreCondition(IRtcBuilderConstants.ACTIVITY_SHUTDOWN, "on_shutdown事前条件");
- rtcParam.setDocActionPostCondition(IRtcBuilderConstants.ACTIVITY_SHUTDOWN, "on_shutdown事後条件");
- //
- rtcParam.setDocActionOverView(IRtcBuilderConstants.ACTIVITY_ACTIVATED, "on_activated概要説明");
- rtcParam.setDocActionPreCondition(IRtcBuilderConstants.ACTIVITY_ACTIVATED, "on_activated事前条件");
- rtcParam.setDocActionPostCondition(IRtcBuilderConstants.ACTIVITY_ACTIVATED, "on_activated事後条件");
- //
- rtcParam.setDocActionOverView(IRtcBuilderConstants.ACTIVITY_DEACTIVATED, "on_deactivated概要説明");
- rtcParam.setDocActionPreCondition(IRtcBuilderConstants.ACTIVITY_DEACTIVATED, "on_deactivated事前条件");
- rtcParam.setDocActionPostCondition(IRtcBuilderConstants.ACTIVITY_DEACTIVATED, "on_deactivated事後条件");
- //
- rtcParam.setDocActionOverView(IRtcBuilderConstants.ACTIVITY_EXECUTE, "on_execute概要説明");
- rtcParam.setDocActionPreCondition(IRtcBuilderConstants.ACTIVITY_EXECUTE, "on_execute事前条件");
- rtcParam.setDocActionPostCondition(IRtcBuilderConstants.ACTIVITY_EXECUTE, "on_execute事後条件");
- //
- rtcParam.setDocActionOverView(IRtcBuilderConstants.ACTIVITY_ABORTING, "on_aborting概要説明");
- rtcParam.setDocActionPreCondition(IRtcBuilderConstants.ACTIVITY_ABORTING, "on_aborting事前条件");
- rtcParam.setDocActionPostCondition(IRtcBuilderConstants.ACTIVITY_ABORTING, "on_aborting事後条件");
- //
- rtcParam.setDocActionOverView(IRtcBuilderConstants.ACTIVITY_ERROR, "on_error概要説明");
- rtcParam.setDocActionPreCondition(IRtcBuilderConstants.ACTIVITY_ERROR, "on_error事前条件");
- rtcParam.setDocActionPostCondition(IRtcBuilderConstants.ACTIVITY_ERROR, "on_error事後条件");
- //
- rtcParam.setDocActionOverView(IRtcBuilderConstants.ACTIVITY_RESET, "on_reset概要説明");
- rtcParam.setDocActionPreCondition(IRtcBuilderConstants.ACTIVITY_RESET, "on_reset事前条件");
- rtcParam.setDocActionPostCondition(IRtcBuilderConstants.ACTIVITY_RESET, "on_reset事後条件");
- //
- rtcParam.setDocActionOverView(IRtcBuilderConstants.ACTIVITY_STATE_UPDATE, "on_state_update概要説明");
- rtcParam.setDocActionPreCondition(IRtcBuilderConstants.ACTIVITY_STATE_UPDATE, "on_state_update事前条件");
- rtcParam.setDocActionPostCondition(IRtcBuilderConstants.ACTIVITY_STATE_UPDATE, "on_state_update事後条件");
- //
- rtcParam.setDocActionOverView(IRtcBuilderConstants.ACTIVITY_RATE_CHANGED, "on_rate_changed概要説明");
- rtcParam.setDocActionPreCondition(IRtcBuilderConstants.ACTIVITY_RATE_CHANGED, "on_rate_changed事前条件");
- rtcParam.setDocActionPostCondition(IRtcBuilderConstants.ACTIVITY_RATE_CHANGED, "on_rate_changed事後条件");
- //
- genParam.getRtcParams().add(rtcParam);
- List<DataPortParam> dataport = new ArrayList<DataPortParam>();
-
- DataPortParam datap1 = new DataPortParam("InP1", "RTC::TimedShort", "", 0);
- datap1.setDocDescription("InPort1の概要");
- datap1.setDocType("InPort1のデータの型");
- datap1.setDocNum("InPort1のデータの数");
- datap1.setDocSemantics("InPort1のデータの意味");
- datap1.setDocUnit("InPort1のデータの単位");
- datap1.setDocOccurrence("InPort1のデータの発生頻度");
- datap1.setDocOperation("InPort1のデータの処理周期");
- dataport.add(datap1);
-
- DataPortParam datap2 = new DataPortParam("InP2", "RTC::TimedLong", "", 0);
- datap2.setDocDescription("InPort2の概要");
- datap2.setDocType("InPort2のデータの型");
- datap2.setDocNum("InPort2のデータの数");
- datap2.setDocSemantics("InPort2のデータの意味");
- datap2.setDocUnit("InPort2のデータの単位");
- datap2.setDocOccurrence("InPort2のデータの発生頻度");
- datap2.setDocOperation("InPort2のデータの処理周期");
- dataport.add(datap2);
-
- rtcParam.getInports().addAll(dataport);
- //
- List<DataPortParam> outport = new ArrayList<DataPortParam>();
-
- DataPortParam datap3 = new DataPortParam("OutP1", "RTC::TimedLong", "", 0);
- datap3.setDocDescription("OutPort1の概要");
- datap3.setDocType("OutPort1のデータの型");
- datap3.setDocNum("OutPort1のデータの数");
- datap3.setDocSemantics("OutPort1のデータの意味");
- datap3.setDocUnit("OutPort1のデータの単位");
- datap3.setDocOccurrence("OutPort1のデータの発生頻度");
- datap3.setDocOperation("OutPort1のデータの処理周期");
- outport.add(datap3);
-
- DataPortParam datap4 = new DataPortParam("OutP2", "RTC::TimedFloat", "", 0);
- datap4.setDocDescription("OutPort2の概要");
- datap4.setDocType("OutPort2のデータの型");
- datap4.setDocNum("OutPort2のデータの数");
- datap4.setDocSemantics("OutPort2のデータの意味");
- datap4.setDocUnit("OutPort2のデータの単位");
- datap4.setDocOccurrence("OutPort2のデータの発生頻度");
- datap4.setDocOperation("OutPort2のデータの処理周期");
- outport.add(datap4);
-
- rtcParam.getOutports().addAll(outport);
-
- ServicePortParam service1 = new ServicePortParam("svPort",0);
- service1.setDocDescription("ServicePort1の概要");
- service1.setDocIfDescription("ServicePort1のインターフェースの概要");
- List<ServicePortInterfaceParam> srvinterts = new ArrayList<ServicePortInterfaceParam>();
- ServicePortInterfaceParam int1 = new ServicePortInterfaceParam(service1, "acc", "", "",
- rootPath + "\\resource\\MyService.idl", "MyService", "", 0);
- int1.setDocDescription("ServiceIF1の概要説明");
- int1.setDocArgument("ServiceIF1の引数");
- int1.setDocReturn("ServiceIF1の返値");
- int1.setDocException("ServiceIF1の例外");
- int1.setDocPreCondition("ServiceIF1の事前条件");
- int1.setDocPostCondition("ServiceIF1の事後条件");
- srvinterts.add(int1);
- service1.getServicePortInterfaces().addAll(srvinterts);
- List<ServicePortParam> srvports = new ArrayList<ServicePortParam>();
- srvports.add(service1);
-
- ServicePortParam service2 = new ServicePortParam("cmPort",0);
- service2.setDocDescription("ServicePort2の概要");
- service2.setDocIfDescription("ServicePort2のインターフェースの概要");
- List<ServicePortInterfaceParam> srvinterts2 = new ArrayList<ServicePortInterfaceParam>();
- ServicePortInterfaceParam int2 = new ServicePortInterfaceParam(service2, "rate", "", "",
- rootPath + "\\resource\\DAQService.idl", "DAQService", "", 1);
- int2.setDocDescription("ServiceIF2の概要説明");
- int2.setDocArgument("ServiceIF2の引数");
- int2.setDocReturn("ServiceIF2の返値");
- int2.setDocException("ServiceIF2の例外");
- int2.setDocPreCondition("ServiceIF2の事前条件");
- int2.setDocPostCondition("ServiceIF2の事後条件");
- srvinterts2.add(int2);
- service2.getServicePortInterfaces().addAll(srvinterts2);
- srvports.add(service2);
-
- List<ConfigSetParam> configset = new ArrayList<ConfigSetParam>();
- ConfigSetParam config1 = new ConfigSetParam("int_param0","int","", "0");
- config1.setDocDataName("Config1の名前");
- config1.setDocDescription("Config1の概要");
- config1.setDocDefaultVal("Config1のデフォルト値");
- config1.setDocUnit("Config1の単位");
- config1.setDocRange("Config1の範囲");
- config1.setDocConstraint("Config1の制約条件");
- configset.add(config1);
- ConfigSetParam config2 = new ConfigSetParam("int_param1","int","", "1");
- config2.setDocDataName("Config2の名前");
- config2.setDocDescription("Config2の概要");
- config2.setDocDefaultVal("Config2のデフォルト値");
- config2.setDocUnit("Config2の単位");
- config2.setDocRange("Config2の範囲");
- config2.setDocConstraint("Config2の制約条件");
- configset.add(config2);
- ConfigSetParam config3 = new ConfigSetParam("double_param0","double","", "0.11");
- config3.setDocDataName("Config3の名前");
- config3.setDocDescription("Config3の概要");
- config3.setDocDefaultVal("Config3のデフォルト値");
- config3.setDocUnit("Config3の単位");
- config3.setDocRange("Config3の範囲");
- config3.setDocConstraint("Config3の制約条件");
- configset.add(config3);
- ConfigSetParam config4 = new ConfigSetParam("str_param0","String","", "hoge");
- config4.setDocDataName("Config4の名前");
- config4.setDocDescription("Config4の概要");
- config4.setDocDefaultVal("Config4のデフォルト値");
- config4.setDocUnit("Config4の単位");
- config4.setDocRange("Config4の範囲");
- config4.setDocConstraint("Config4の制約条件");
- configset.add(config4);
- ConfigSetParam config5 = new ConfigSetParam("str_param1","String","", "dara");
- config5.setDocDataName("Config5の名前");
- config5.setDocDescription("Config5の概要");
- config5.setDocDefaultVal("Config5のデフォルト値");
- config5.setDocUnit("Config5の単位");
- config5.setDocRange("Config5の範囲");
- config5.setDocConstraint("Config5の制約条件");
- configset.add(config5);
- rtcParam.getConfigParams().addAll(configset);
-
- rtcParam.getServicePorts().addAll(srvports);
-
- Generator generator = new Generator();
- GenerateManager manager = new PythonGenerateManager();
- generator.addGenerateManager(manager);
- List<GeneratedResult> result = generator.generateTemplateCode(genParam);
-
- String resourceDir = rootPath + "\\resource\\Python\\Doc\\full\\";
-
- checkCode(result, resourceDir, "foo.py");
- checkCode(result, resourceDir, "MyService_idl.py");
- checkCode(result, resourceDir, "DAQService_idl.py");
- checkCode(result, resourceDir, "_GlobalIDL/__init__.py");
- checkCode(result, resourceDir, "_GlobalIDL__POA/__init__.py");
- checkCode(result, resourceDir, "MyService_idl_example.py");
- checkCode(result, resourceDir, "README.foo");
- }
-
- public void testDocRefer() throws Exception{
- GeneratorParam genParam = new GeneratorParam();
- RtcParam rtcParam = new RtcParam(genParam, true);
- rtcParam.setOutputProject(rootPath + "\\resource\\work");
- rtcParam.setLanguage(IRtcBuilderConstantsPython.LANG_PYTHON);
- rtcParam.setLanguageArg(IRtcBuilderConstantsPython.LANG_PYTHON_ARG);
- rtcParam.setName("foo");
- rtcParam.setDescription("MDesc");
- rtcParam.setVersion("1.0.1");
- rtcParam.setVender("TA");
- rtcParam.setCategory("Manip");
- rtcParam.setComponentType("STATIC2");
- rtcParam.setActivityType("PERIODIC2");
- rtcParam.setMaxInstance(5);
- rtcParam.setRtmVersion("0.4.2");
- //
- rtcParam.setDocCreator("Noriaki Ando <n-ando at aist.go.jp>");
- rtcParam.setDocLicense("Copyright (C) 2006-2008 ライセンス");
- rtcParam.setDocDescription("本コンポーネントの概要説明");
- rtcParam.setDocInOut("本コンポーネントの入出力");
- rtcParam.setDocAlgorithm("本コンポーネントのアルゴリズムなど");
- rtcParam.setDocReference("参考文献の情報");
- //
- genParam.getRtcParams().add(rtcParam);
- List<DataPortParam> dataport = new ArrayList<DataPortParam>();
- dataport.add(new DataPortParam("InP1", "RTC::TimedShort", "", 0));
- dataport.add(new DataPortParam("InP2", "RTC::TimedLong", "", 0));
- rtcParam.getInports().addAll(dataport);
- List<DataPortParam> outport = new ArrayList<DataPortParam>();
- outport.add(new DataPortParam("OutP1", "RTC::TimedLong", "", 0));
- outport.add(new DataPortParam("OutP2", "RTC::TimedFloat", "", 0));
- rtcParam.getOutports().addAll(outport);
-
- ServicePortParam service1 = new ServicePortParam("svPort",0);
- List<ServicePortInterfaceParam> srvinterts = new ArrayList<ServicePortInterfaceParam>();
- ServicePortInterfaceParam int1 = new ServicePortInterfaceParam(service1, "acc", "", "",
- rootPath + "\\resource\\MyService.idl", "MyService", "", 0);
- srvinterts.add(int1);
- service1.getServicePortInterfaces().addAll(srvinterts);
- List<ServicePortParam> srvports = new ArrayList<ServicePortParam>();
- srvports.add(service1);
-
- ServicePortParam service2 = new ServicePortParam("cmPort",0);
- List<ServicePortInterfaceParam> srvinterts2 = new ArrayList<ServicePortInterfaceParam>();
- ServicePortInterfaceParam int2 = new ServicePortInterfaceParam(service2, "rate", "", "",
- rootPath + "\\resource\\DAQService.idl", "DAQService", "", 1);
- srvinterts2.add(int2);
- service2.getServicePortInterfaces().addAll(srvinterts2);
- srvports.add(service2);
-
- rtcParam.getServicePorts().addAll(srvports);
-
- Generator generator = new Generator();
- GenerateManager manager = new PythonGenerateManager();
- generator.addGenerateManager(manager);
- List<GeneratedResult> result = generator.generateTemplateCode(genParam);
-
- String resourceDir = rootPath + "\\resource\\Python\\Doc\\refer\\";
-
- checkCode(result, resourceDir, "foo.py");
- checkCode(result, resourceDir, "MyService_idl.py");
- checkCode(result, resourceDir, "DAQService_idl.py");
- checkCode(result, resourceDir, "_GlobalIDL/__init__.py");
- checkCode(result, resourceDir, "_GlobalIDL__POA/__init__.py");
- checkCode(result, resourceDir, "MyService_idl_example.py");
- checkCode(result, resourceDir, "README.foo");
- }
-
- public void testDocAuthorLong() throws Exception{
- GeneratorParam genParam = new GeneratorParam();
- RtcParam rtcParam = new RtcParam(genParam, true);
- rtcParam.setOutputProject(rootPath + "\\resource\\work");
- rtcParam.setLanguage(IRtcBuilderConstantsPython.LANG_PYTHON);
- rtcParam.setLanguageArg(IRtcBuilderConstantsPython.LANG_PYTHON_ARG);
- rtcParam.setName("foo");
- rtcParam.setDescription("MDesc");
- rtcParam.setVersion("1.0.1");
- rtcParam.setVender("TA");
- rtcParam.setCategory("Manip");
- rtcParam.setComponentType("STATIC2");
- rtcParam.setActivityType("PERIODIC2");
- rtcParam.setMaxInstance(5);
- rtcParam.setRtmVersion("0.4.2");
- //
- rtcParam.setDocCreator("Noriaki Ando <n-ando at aist.go.jp>34567894123456789512345678961234567897123456789812345");
- //
- genParam.getRtcParams().add(rtcParam);
- List<DataPortParam> dataport = new ArrayList<DataPortParam>();
- dataport.add(new DataPortParam("InP1", "RTC::TimedShort", "", 0));
- dataport.add(new DataPortParam("InP2", "RTC::TimedLong", "", 0));
- rtcParam.getInports().addAll(dataport);
- List<DataPortParam> outport = new ArrayList<DataPortParam>();
- outport.add(new DataPortParam("OutP1", "RTC::TimedLong", "", 0));
- outport.add(new DataPortParam("OutP2", "RTC::TimedFloat", "", 0));
- rtcParam.getOutports().addAll(outport);
-
- ServicePortParam service1 = new ServicePortParam("svPort",0);
- List<ServicePortInterfaceParam> srvinterts = new ArrayList<ServicePortInterfaceParam>();
- ServicePortInterfaceParam int1 = new ServicePortInterfaceParam(service1, "acc", "", "",
- rootPath + "\\resource\\MyService.idl", "MyService", "", 0);
- srvinterts.add(int1);
- service1.getServicePortInterfaces().addAll(srvinterts);
- List<ServicePortParam> srvports = new ArrayList<ServicePortParam>();
- srvports.add(service1);
-
- ServicePortParam service2 = new ServicePortParam("cmPort",0);
- List<ServicePortInterfaceParam> srvinterts2 = new ArrayList<ServicePortInterfaceParam>();
- ServicePortInterfaceParam int2 = new ServicePortInterfaceParam(service2, "rate", "", "",
- rootPath + "\\resource\\DAQService.idl", "DAQService", "", 1);
- srvinterts2.add(int2);
- service2.getServicePortInterfaces().addAll(srvinterts2);
- srvports.add(service2);
-
- rtcParam.getServicePorts().addAll(srvports);
-
- Generator generator = new Generator();
- GenerateManager manager = new PythonGenerateManager();
- generator.addGenerateManager(manager);
- List<GeneratedResult> result = generator.generateTemplateCode(genParam);
-
- String resourceDir = rootPath + "\\resource\\Python\\Doc\\authorLong\\";
-
- checkCode(result, resourceDir, "foo.py");
- checkCode(result, resourceDir, "MyService_idl.py");
- checkCode(result, resourceDir, "DAQService_idl.py");
- checkCode(result, resourceDir, "_GlobalIDL/__init__.py");
- checkCode(result, resourceDir, "_GlobalIDL__POA/__init__.py");
- checkCode(result, resourceDir, "MyService_idl_example.py");
- checkCode(result, resourceDir, "README.foo");
- }
-
- public void testDocAuthor() throws Exception{
- GeneratorParam genParam = new GeneratorParam();
- RtcParam rtcParam = new RtcParam(genParam, true);
- rtcParam.setOutputProject(rootPath + "\\resource\\work");
- rtcParam.setLanguage(IRtcBuilderConstantsPython.LANG_PYTHON);
- rtcParam.setLanguageArg(IRtcBuilderConstantsPython.LANG_PYTHON_ARG);
- rtcParam.setName("foo");
- rtcParam.setDescription("MDesc");
- rtcParam.setVersion("1.0.1");
- rtcParam.setVender("TA");
- rtcParam.setCategory("Manip");
- rtcParam.setComponentType("STATIC2");
- rtcParam.setActivityType("PERIODIC2");
- rtcParam.setMaxInstance(5);
- rtcParam.setRtmVersion("0.4.2");
- //
- rtcParam.setDocCreator("Noriaki Ando <n-ando at aist.go.jp>");
- //
- genParam.getRtcParams().add(rtcParam);
- List<DataPortParam> dataport = new ArrayList<DataPortParam>();
- dataport.add(new DataPortParam("InP1", "RTC::TimedShort", "", 0));
- dataport.add(new DataPortParam("InP2", "RTC::TimedLong", "", 0));
- rtcParam.getInports().addAll(dataport);
- List<DataPortParam> outport = new ArrayList<DataPortParam>();
- outport.add(new DataPortParam("OutP1", "RTC::TimedLong", "", 0));
- outport.add(new DataPortParam("OutP2", "RTC::TimedFloat", "", 0));
- rtcParam.getOutports().addAll(outport);
-
- ServicePortParam service1 = new ServicePortParam("svPort",0);
- List<ServicePortInterfaceParam> srvinterts = new ArrayList<ServicePortInterfaceParam>();
- ServicePortInterfaceParam int1 = new ServicePortInterfaceParam(service1, "acc", "", "",
- rootPath + "\\resource\\MyService.idl", "MyService", "", 0);
- srvinterts.add(int1);
- service1.getServicePortInterfaces().addAll(srvinterts);
- List<ServicePortParam> srvports = new ArrayList<ServicePortParam>();
- srvports.add(service1);
-
- ServicePortParam service2 = new ServicePortParam("cmPort",0);
- List<ServicePortInterfaceParam> srvinterts2 = new ArrayList<ServicePortInterfaceParam>();
- ServicePortInterfaceParam int2 = new ServicePortInterfaceParam(service2, "rate", "", "",
- rootPath + "\\resource\\DAQService.idl", "DAQService", "", 1);
- srvinterts2.add(int2);
- service2.getServicePortInterfaces().addAll(srvinterts2);
- srvports.add(service2);
-
- rtcParam.getServicePorts().addAll(srvports);
-
- Generator generator = new Generator();
- GenerateManager manager = new PythonGenerateManager();
- generator.addGenerateManager(manager);
- List<GeneratedResult> result = generator.generateTemplateCode(genParam);
-
- String resourceDir = rootPath + "\\resource\\Python\\Doc\\author\\";
-
- checkCode(result, resourceDir, "foo.py");
- checkCode(result, resourceDir, "MyService_idl.py");
- checkCode(result, resourceDir, "DAQService_idl.py");
- checkCode(result, resourceDir, "_GlobalIDL/__init__.py");
- checkCode(result, resourceDir, "_GlobalIDL__POA/__init__.py");
- checkCode(result, resourceDir, "MyService_idl_example.py");
- checkCode(result, resourceDir, "README.foo");
- }
-
- public void testOriginal() throws Exception{
- GeneratorParam genParam = new GeneratorParam();
- RtcParam rtcParam = new RtcParam(genParam, true);
- rtcParam.setOutputProject(rootPath + "\\resource\\work");
- rtcParam.setLanguage(IRtcBuilderConstantsPython.LANG_PYTHON);
- rtcParam.setLanguageArg(IRtcBuilderConstantsPython.LANG_PYTHON_ARG);
- rtcParam.setName("foo");
- rtcParam.setDescription("MDesc");
- rtcParam.setVersion("1.0.1");
- rtcParam.setVender("TA");
- rtcParam.setCategory("Manip");
- rtcParam.setComponentType("STATIC2");
- rtcParam.setActivityType("PERIODIC2");
- rtcParam.setMaxInstance(5);
- rtcParam.setRtmVersion("0.4.2");
- genParam.getRtcParams().add(rtcParam);
- List<DataPortParam> dataport = new ArrayList<DataPortParam>();
- dataport.add(new DataPortParam("InP1", "RTC::TimedShort", "", 0));
- dataport.add(new DataPortParam("InP2", "RTC::TimedLong", "", 0));
- rtcParam.getInports().addAll(dataport);
- List<DataPortParam> outport = new ArrayList<DataPortParam>();
- outport.add(new DataPortParam("OutP1", "RTC::TimedLong", "", 0));
- outport.add(new DataPortParam("OutP2", "RTC::TimedFloat", "", 0));
- rtcParam.getOutports().addAll(outport);
-
- ServicePortParam service1 = new ServicePortParam("svPort",0);
- List<ServicePortInterfaceParam> srvinterts = new ArrayList<ServicePortInterfaceParam>();
- ServicePortInterfaceParam int1 = new ServicePortInterfaceParam(service1, "acc", "", "",
- rootPath + "\\resource\\MyService.idl", "MyService", "", 0);
- srvinterts.add(int1);
- service1.getServicePortInterfaces().addAll(srvinterts);
- List<ServicePortParam> srvports = new ArrayList<ServicePortParam>();
- srvports.add(service1);
-
- ServicePortParam service2 = new ServicePortParam("cmPort",0);
- List<ServicePortInterfaceParam> srvinterts2 = new ArrayList<ServicePortInterfaceParam>();
- ServicePortInterfaceParam int2 = new ServicePortInterfaceParam(service2, "rate", "", "",
- rootPath + "\\resource\\DAQService.idl", "DAQService", "", 1);
- srvinterts2.add(int2);
- service2.getServicePortInterfaces().addAll(srvinterts2);
- srvports.add(service2);
-
- rtcParam.getServicePorts().addAll(srvports);
-
- Generator generator = new Generator();
- GenerateManager manager = new PythonGenerateManager();
- generator.addGenerateManager(manager);
- List<GeneratedResult> result = generator.generateTemplateCode(genParam);
-
- String resourceDir = rootPath + "\\resource\\Python\\service2\\";
-
- checkCode(result, resourceDir, "foo.py");
- checkCode(result, resourceDir, "MyService_idl.py");
- checkCode(result, resourceDir, "DAQService_idl.py");
- checkCode(result, resourceDir, "_GlobalIDL/__init__.py");
- checkCode(result, resourceDir, "_GlobalIDL__POA/__init__.py");
- checkCode(result, resourceDir, "MyService_idl_example.py");
- checkCode(result, resourceDir, "README.foo");
- }
-}
Deleted: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/PyExCxtTest.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/PyExCxtTest.java 2012-02-07 14:48:47 UTC (rev 258)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/PyExCxtTest.java 2012-02-10 16:57:54 UTC (rev 259)
@@ -1,57 +0,0 @@
-package jp.go.aist.rtm.rtcbuilder.python._test;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import jp.go.aist.rtm.rtcbuilder.Generator;
-import jp.go.aist.rtm.rtcbuilder.generator.GeneratedResult;
-import jp.go.aist.rtm.rtcbuilder.generator.param.ConfigSetParam;
-import jp.go.aist.rtm.rtcbuilder.generator.param.GeneratorParam;
-import jp.go.aist.rtm.rtcbuilder.generator.param.RtcParam;
-import jp.go.aist.rtm.rtcbuilder.manager.GenerateManager;
-import jp.go.aist.rtm.rtcbuilder.python.IRtcBuilderConstantsPython;
-import jp.go.aist.rtm.rtcbuilder.python.manager.PythonGenerateManager;
-
-public class PyExCxtTest extends TestBase {
-
- protected void setUp() throws Exception {
- }
-
- public void testExecutionContext() throws Exception{
- GeneratorParam genParam = new GeneratorParam();
- RtcParam rtcParam = new RtcParam(genParam, true);
- rtcParam.setOutputProject(rootPath + "\\resource\\work");
- rtcParam.setLanguage(IRtcBuilderConstantsPython.LANG_PYTHON);
- rtcParam.setLanguageArg(IRtcBuilderConstantsPython.LANG_PYTHON_ARG);
- rtcParam.setName("foo");
- rtcParam.setDescription("MDesc");
- rtcParam.setVersion("1.0.3");
- rtcParam.setVender("TA2");
- rtcParam.setCategory("manip2");
- rtcParam.setComponentType("STATIC2");
- rtcParam.setActivityType("PERIODIC2");
- rtcParam.setMaxInstance(3);
- rtcParam.setExecutionRate(5.0);
- rtcParam.setRtmVersion("0.4.2");
-
- genParam.getRtcParams().add(rtcParam);
- List<ConfigSetParam> configset = new ArrayList<ConfigSetParam>();
- configset.add(new ConfigSetParam("int_param0","int","","0"));
- configset.add(new ConfigSetParam("int_param1","int","","1"));
- configset.add(new ConfigSetParam("double_param0","double","","0.11"));
- configset.add(new ConfigSetParam("str_param0","String","","hoge"));
- configset.add(new ConfigSetParam("str_param1","String","","dara"));
- rtcParam.getConfigParams().addAll(configset);
-
- Generator generator = new Generator();
- GenerateManager manager = new PythonGenerateManager();
- generator.addGenerateManager(manager);
- List<GeneratedResult> result = generator.generateTemplateCode(genParam);
-
- String resourceDir = rootPath + "\\resource\\Python\\ExecutionCxt\\";
-
- checkCode(result, resourceDir, "foo.py");
- checkCode(result, resourceDir, "README.foo");
- checkCode(result, resourceDir, "rtc.conf");
- }
-}
Deleted: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/PyImplTest.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/PyImplTest.java 2012-02-07 14:48:47 UTC (rev 258)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/PyImplTest.java 2012-02-10 16:57:54 UTC (rev 259)
@@ -1,149 +0,0 @@
-package jp.go.aist.rtm.rtcbuilder.python._test;
-
-import java.util.List;
-
-import jp.go.aist.rtm.rtcbuilder.Generator;
-import jp.go.aist.rtm.rtcbuilder.generator.GeneratedResult;
-import jp.go.aist.rtm.rtcbuilder.generator.param.GeneratorParam;
-import jp.go.aist.rtm.rtcbuilder.generator.param.RtcParam;
-import jp.go.aist.rtm.rtcbuilder.manager.GenerateManager;
-import jp.go.aist.rtm.rtcbuilder.python.IRtcBuilderConstantsPython;
-import jp.go.aist.rtm.rtcbuilder.python.manager.PythonGenerateManager;
-
-public class PyImplTest extends TestBase {
-
- protected void setUp() throws Exception {
- }
-
- public void testAll() throws Exception{
- GeneratorParam genParam = new GeneratorParam();
- RtcParam rtcParam = new RtcParam(genParam, true);
- rtcParam.setOutputProject(rootPath + "\\resource\\work");
- rtcParam.setLanguage(IRtcBuilderConstantsPython.LANG_PYTHON);
- rtcParam.setLanguageArg(IRtcBuilderConstantsPython.LANG_PYTHON_ARG);
- rtcParam.setName("foo");
- rtcParam.setDescription("MDesc");
- rtcParam.setVersion("1.0.1");
- rtcParam.setVender("TA");
- rtcParam.setCategory("Manip");
- rtcParam.setComponentType("STATIC2");
- rtcParam.setActivityType("PERIODIC2");
- rtcParam.setRtmVersion("0.4.2");
- rtcParam.setMaxInstance(5);
- rtcParam.setActionImplemented(0, true);
- rtcParam.setActionImplemented(1, true);
- rtcParam.setActionImplemented(2, true);
- rtcParam.setActionImplemented(3, true);
- rtcParam.setActionImplemented(4, true);
- rtcParam.setActionImplemented(5, true);
- rtcParam.setActionImplemented(6, true);
- rtcParam.setActionImplemented(7, true);
- rtcParam.setActionImplemented(8, true);
- rtcParam.setActionImplemented(9, true);
- rtcParam.setActionImplemented(10, true);
- rtcParam.setActionImplemented(11, true);
- genParam.getRtcParams().add(rtcParam);
-
- Generator generator = new Generator();
- GenerateManager manager = new PythonGenerateManager();
- generator.addGenerateManager(manager);
- List<GeneratedResult> result = generator.generateTemplateCode(genParam);
-
- String resourceDir = rootPath + "\\resource\\Python\\impl\\all\\";
-
- checkCode(result, resourceDir, "foo.py");
- checkCode(result, resourceDir, "README.foo");
- }
-
- public void testExecute() throws Exception{
- GeneratorParam genParam = new GeneratorParam();
- RtcParam rtcParam = new RtcParam(genParam, true);
- rtcParam.setOutputProject(rootPath + "\\resource\\work");
- rtcParam.setLanguage(IRtcBuilderConstantsPython.LANG_PYTHON);
- rtcParam.setLanguageArg(IRtcBuilderConstantsPython.LANG_PYTHON_ARG);
- rtcParam.setName("foo");
- rtcParam.setDescription("MDesc");
- rtcParam.setVersion("1.0.1");
- rtcParam.setVender("TA");
- rtcParam.setCategory("Manip");
- rtcParam.setComponentType("STATIC2");
- rtcParam.setActivityType("PERIODIC2");
- rtcParam.setRtmVersion("0.4.2");
- rtcParam.setMaxInstance(5);
- rtcParam.setActionImplemented(0, true);
- rtcParam.setActionImplemented(1, true);
- rtcParam.setActionImplemented(3, true);
- rtcParam.setActionImplemented(5, true);
- rtcParam.setActionImplemented(9, true);
- genParam.getRtcParams().add(rtcParam);
-
- Generator generator = new Generator();
- GenerateManager manager = new PythonGenerateManager();
- generator.addGenerateManager(manager);
- List<GeneratedResult> result = generator.generateTemplateCode(genParam);
-
- String resourceDir = rootPath + "\\resource\\Python\\impl\\execute\\";
-
- checkCode(result, resourceDir, "foo.py");
- checkCode(result, resourceDir, "README.foo");
- }
-
- public void testFinalize() throws Exception{
- GeneratorParam genParam = new GeneratorParam();
- RtcParam rtcParam = new RtcParam(genParam, true);
- rtcParam.setOutputProject(rootPath + "\\resource\\work");
- rtcParam.setLanguage(IRtcBuilderConstantsPython.LANG_PYTHON);
- rtcParam.setLanguageArg(IRtcBuilderConstantsPython.LANG_PYTHON_ARG);
- rtcParam.setName("foo");
- rtcParam.setDescription("MDesc");
- rtcParam.setVersion("1.0.1");
- rtcParam.setVender("TA");
- rtcParam.setCategory("Manip");
- rtcParam.setComponentType("STATIC2");
- rtcParam.setActivityType("PERIODIC2");
- rtcParam.setRtmVersion("0.4.2");
- rtcParam.setMaxInstance(5);
- rtcParam.setActionImplemented(0, true);
- rtcParam.setActionImplemented(1, true);
- genParam.getRtcParams().add(rtcParam);
-
- Generator generator = new Generator();
- GenerateManager manager = new PythonGenerateManager();
- generator.addGenerateManager(manager);
- List<GeneratedResult> result = generator.generateTemplateCode(genParam);
-
- String resourceDir = rootPath + "\\resource\\Python\\impl\\finalize\\";
-
- checkCode(result, resourceDir, "foo.py");
- checkCode(result, resourceDir, "README.foo");
- }
-
- public void testInitialize() throws Exception{
- GeneratorParam genParam = new GeneratorParam();
- RtcParam rtcParam = new RtcParam(genParam, true);
- rtcParam.setOutputProject(rootPath + "\\resource\\work");
- rtcParam.setLanguage(IRtcBuilderConstantsPython.LANG_PYTHON);
- rtcParam.setLanguageArg(IRtcBuilderConstantsPython.LANG_PYTHON_ARG);
- rtcParam.setName("foo");
- rtcParam.setDescription("MDesc");
- rtcParam.setVersion("1.0.1");
- rtcParam.setVender("TA");
- rtcParam.setCategory("Manip");
- rtcParam.setComponentType("STATIC2");
- rtcParam.setActivityType("PERIODIC2");
- rtcParam.setRtmVersion("0.4.2");
- rtcParam.setMaxInstance(5);
- rtcParam.setActionImplemented(0, true);
- genParam.getRtcParams().add(rtcParam);
-
- Generator generator = new Generator();
- GenerateManager manager = new PythonGenerateManager();
- generator.addGenerateManager(manager);
- List<GeneratedResult> result = generator.generateTemplateCode(genParam);
-
- String resourceDir = rootPath + "\\resource\\Python\\impl\\initialize\\";
-
- checkCode(result, resourceDir, "foo.py");
- checkCode(result, resourceDir, "README.foo");
- }
-}
Deleted: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/PySystemConfigTest.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/PySystemConfigTest.java 2012-02-07 14:48:47 UTC (rev 258)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/PySystemConfigTest.java 2012-02-10 16:57:54 UTC (rev 259)
@@ -1,63 +0,0 @@
-package jp.go.aist.rtm.rtcbuilder.python._test;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import jp.go.aist.rtm.rtcbuilder.Generator;
-import jp.go.aist.rtm.rtcbuilder.generator.GeneratedResult;
-import jp.go.aist.rtm.rtcbuilder.generator.param.ConfigParameterParam;
-import jp.go.aist.rtm.rtcbuilder.generator.param.ConfigSetParam;
-import jp.go.aist.rtm.rtcbuilder.generator.param.GeneratorParam;
-import jp.go.aist.rtm.rtcbuilder.generator.param.RtcParam;
-import jp.go.aist.rtm.rtcbuilder.manager.GenerateManager;
-import jp.go.aist.rtm.rtcbuilder.python.IRtcBuilderConstantsPython;
-import jp.go.aist.rtm.rtcbuilder.python.manager.PythonGenerateManager;
-
-public class PySystemConfigTest extends TestBase {
-
- protected void setUp() throws Exception {
- }
-
- public void testExecutionContext() throws Exception{
- GeneratorParam genParam = new GeneratorParam();
- RtcParam rtcParam = new RtcParam(genParam, true);
- rtcParam.setOutputProject(rootPath + "\\resource\\work");
- rtcParam.setLanguage(IRtcBuilderConstantsPython.LANG_PYTHON);
- rtcParam.setLanguageArg(IRtcBuilderConstantsPython.LANG_PYTHON_ARG);
- rtcParam.setName("foo");
- rtcParam.setDescription("MDesc");
- rtcParam.setVersion("1.0.3");
- rtcParam.setVender("TA2");
- rtcParam.setCategory("manip2");
- rtcParam.setComponentType("STATIC2");
- rtcParam.setActivityType("PERIODIC2");
- rtcParam.setMaxInstance(3);
- rtcParam.setExecutionRate(5.0);
- rtcParam.setRtmVersion("0.4.2");
-
- genParam.getRtcParams().add(rtcParam);
- List<ConfigSetParam> configset = new ArrayList<ConfigSetParam>();
- configset.add(new ConfigSetParam("int_param0","int","","0"));
- configset.add(new ConfigSetParam("int_param1","int","","1"));
- configset.add(new ConfigSetParam("double_param0","double","","0.11"));
- configset.add(new ConfigSetParam("str_param0","String","","hoge"));
- configset.add(new ConfigSetParam("str_param1","String","","dara"));
- rtcParam.getConfigParams().addAll(configset);
-
- List<ConfigParameterParam> configparam = new ArrayList<ConfigParameterParam>();
- configparam.add(new ConfigParameterParam("timer.tick","0.1"));
- configparam.add(new ConfigParameterParam("naming.update.interval","10.0"));
- rtcParam.getConfigParameterParams().addAll(configparam);
-
- Generator generator = new Generator();
- GenerateManager manager = new PythonGenerateManager();
- generator.addGenerateManager(manager);
- List<GeneratedResult> result = generator.generateTemplateCode(genParam);
-
- String resourceDir = rootPath + "\\resource\\Python\\SystemConfig\\";
-
- checkCode(result, resourceDir, "foo.py");
- checkCode(result, resourceDir, "README.foo");
- checkCode(result, resourceDir, "rtc.conf");
- }
-}
Deleted: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/PyVariableTest.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/PyVariableTest.java 2012-02-07 14:48:47 UTC (rev 258)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/PyVariableTest.java 2012-02-10 16:57:54 UTC (rev 259)
@@ -1,178 +0,0 @@
-package jp.go.aist.rtm.rtcbuilder.python._test;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import jp.go.aist.rtm.rtcbuilder.Generator;
-import jp.go.aist.rtm.rtcbuilder.IRtcBuilderConstants;
-import jp.go.aist.rtm.rtcbuilder.generator.GeneratedResult;
-import jp.go.aist.rtm.rtcbuilder.generator.param.DataPortParam;
-import jp.go.aist.rtm.rtcbuilder.generator.param.GeneratorParam;
-import jp.go.aist.rtm.rtcbuilder.generator.param.RtcParam;
-import jp.go.aist.rtm.rtcbuilder.generator.param.ServicePortInterfaceParam;
-import jp.go.aist.rtm.rtcbuilder.generator.param.ServicePortParam;
-import jp.go.aist.rtm.rtcbuilder.manager.GenerateManager;
-import jp.go.aist.rtm.rtcbuilder.python.IRtcBuilderConstantsPython;
-import jp.go.aist.rtm.rtcbuilder.python.manager.PythonGenerateManager;
-
-public class PyVariableTest extends TestBase {
-
- protected void setUp() throws Exception {
- }
-
- public void testServicePort2() throws Exception{
- GeneratorParam genParam = new GeneratorParam();
- RtcParam rtcParam = new RtcParam(genParam, true);
- rtcParam.setOutputProject(rootPath + "\\resource\\work");
- rtcParam.setLanguage(IRtcBuilderConstantsPython.LANG_PYTHON);
- rtcParam.setLanguageArg(IRtcBuilderConstantsPython.LANG_PYTHON_ARG);
- rtcParam.setName("foo");
- rtcParam.setDescription("MDesc");
- rtcParam.setVersion("1.0.1");
- rtcParam.setVender("TA");
- rtcParam.setCategory("Manip");
- rtcParam.setComponentType("STATIC2");
- rtcParam.setActivityType("PERIODIC2");
- rtcParam.setMaxInstance(5);
- rtcParam.setRtmVersion(IRtcBuilderConstants.RTM_VERSION_042);
- genParam.getRtcParams().add(rtcParam);
- List<DataPortParam> dataport = new ArrayList<DataPortParam>();
- dataport.add(new DataPortParam("InP1", "RTC::TimedShort", "", 0));
- dataport.add(new DataPortParam("InP2", "RTC::TimedLong", "", 0));
- rtcParam.getInports().addAll(dataport);
- List<DataPortParam> outport = new ArrayList<DataPortParam>();
- outport.add(new DataPortParam("OutP1", "RTC::TimedLong", "", 0));
- outport.add(new DataPortParam("OutP2", "RTC::TimedFloat", "", 0));
- rtcParam.getOutports().addAll(outport);
-
- ServicePortParam service1 = new ServicePortParam("svPort",0);
- List<ServicePortInterfaceParam> srvinterts = new ArrayList<ServicePortInterfaceParam>();
- ServicePortInterfaceParam int1 = new ServicePortInterfaceParam(service1, "acc", "acinst", "acvaria",
- rootPath + "\\resource\\MyService.idl", "MyService", "", 0);
- srvinterts.add(int1);
- service1.getServicePortInterfaces().addAll(srvinterts);
- List<ServicePortParam> srvports = new ArrayList<ServicePortParam>();
- srvports.add(service1);
-
- ServicePortParam service2 = new ServicePortParam("cmPort",0);
- List<ServicePortInterfaceParam> srvinterts2 = new ArrayList<ServicePortInterfaceParam>();
- ServicePortInterfaceParam int2 = new ServicePortInterfaceParam(service2, "rate", "rinst", "rvaria",
- rootPath + "\\resource\\DAQService.idl", "DAQService", "", 1);
- srvinterts2.add(int2);
- service2.getServicePortInterfaces().addAll(srvinterts2);
- srvports.add(service2);
-
- rtcParam.getServicePorts().addAll(srvports);
-
- Generator generator = new Generator();
- GenerateManager manager = new PythonGenerateManager();
- generator.addGenerateManager(manager);
- List<GeneratedResult> result = generator.generateTemplateCode(genParam);
-
- String resourceDir = rootPath + "\\resource\\Python\\Variable\\ServicePort2\\";
-
- checkCode(result, resourceDir, "foo.py");
- checkCode(result, resourceDir, "MyService_idl.py");
- checkCode(result, resourceDir, "DAQService_idl.py");
- checkCode(result, resourceDir, "_GlobalIDL/__init__.py");
- checkCode(result, resourceDir, "_GlobalIDL__POA/__init__.py");
- checkCode(result, resourceDir, "MyService_idl_example.py");
- checkCode(result, resourceDir, "README.foo");
- }
-
- public void testServicePort1() throws Exception{
- GeneratorParam genParam = new GeneratorParam();
- RtcParam rtcParam = new RtcParam(genParam, true);
- rtcParam.setOutputProject(rootPath + "\\resource\\work");
- rtcParam.setLanguage(IRtcBuilderConstantsPython.LANG_PYTHON);
- rtcParam.setLanguageArg(IRtcBuilderConstantsPython.LANG_PYTHON_ARG);
- rtcParam.setName("foo");
- rtcParam.setDescription("MDesc");
- rtcParam.setVersion("1.0.1");
- rtcParam.setVender("TA");
- rtcParam.setCategory("Manip");
- rtcParam.setComponentType("STATIC2");
- rtcParam.setActivityType("PERIODIC2");
- rtcParam.setRtmVersion("0.4.2");
- rtcParam.setMaxInstance(5);
- genParam.getRtcParams().add(rtcParam);
- List<DataPortParam> dataport = new ArrayList<DataPortParam>();
- dataport.add(new DataPortParam("InP1", "RTC::TimedShort", "", 0));
- dataport.add(new DataPortParam("InP2", "RTC::TimedLong", "", 0));
- rtcParam.getInports().addAll(dataport);
- List<DataPortParam> outport = new ArrayList<DataPortParam>();
- outport.add(new DataPortParam("OutP1", "RTC::TimedLong", "", 0));
- outport.add(new DataPortParam("OutP2", "RTC::TimedFloat", "", 0));
- rtcParam.getOutports().addAll(outport);
-
- ServicePortParam service1 = new ServicePortParam("svPort",0);
- List<ServicePortInterfaceParam> srvinterts = new ArrayList<ServicePortInterfaceParam>();
- ServicePortInterfaceParam int1 = new ServicePortInterfaceParam(service1, "acc", "acinst", "",
- rootPath + "\\resource\\MyService.idl", "MyService", "", 0);
- srvinterts.add(int1);
- service1.getServicePortInterfaces().addAll(srvinterts);
- List<ServicePortParam> srvports = new ArrayList<ServicePortParam>();
- srvports.add(service1);
-
- ServicePortParam service2 = new ServicePortParam("cmPort",0);
- List<ServicePortInterfaceParam> srvinterts2 = new ArrayList<ServicePortInterfaceParam>();
- ServicePortInterfaceParam int2 = new ServicePortInterfaceParam(service2, "rate", "rinst", "",
- rootPath + "\\resource\\DAQService.idl", "DAQService", "", 1);
- srvinterts2.add(int2);
- service2.getServicePortInterfaces().addAll(srvinterts2);
- srvports.add(service2);
-
- rtcParam.getServicePorts().addAll(srvports);
-
- Generator generator = new Generator();
- GenerateManager manager = new PythonGenerateManager();
- generator.addGenerateManager(manager);
- List<GeneratedResult> result = generator.generateTemplateCode(genParam);
-
- String resourceDir = rootPath + "\\resource\\Python\\Variable\\ServicePort1\\";
-
- checkCode(result, resourceDir, "foo.py");
- checkCode(result, resourceDir, "MyService_idl.py");
- checkCode(result, resourceDir, "DAQService_idl.py");
- checkCode(result, resourceDir, "_GlobalIDL/__init__.py");
- checkCode(result, resourceDir, "_GlobalIDL__POA/__init__.py");
- checkCode(result, resourceDir, "MyService_idl_example.py");
- checkCode(result, resourceDir, "README.foo");
- }
-
- public void testDataPort() throws Exception{
- GeneratorParam genParam = new GeneratorParam();
- RtcParam rtcParam = new RtcParam(genParam, true);
- rtcParam.setOutputProject(rootPath + "\\resource\\work");
- rtcParam.setLanguage(IRtcBuilderConstantsPython.LANG_PYTHON);
- rtcParam.setLanguageArg(IRtcBuilderConstantsPython.LANG_PYTHON_ARG);
- rtcParam.setName("foo");
- rtcParam.setDescription("MDesc");
- rtcParam.setVersion("1.0.1");
- rtcParam.setVender("TA");
- rtcParam.setCategory("Manip");
- rtcParam.setComponentType("STATIC2");
- rtcParam.setActivityType("PERIODIC2");
- rtcParam.setMaxInstance(5);
- rtcParam.setRtmVersion("0.4.2");
- genParam.getRtcParams().add(rtcParam);
- List<DataPortParam> dataport = new ArrayList<DataPortParam>();
- dataport.add(new DataPortParam("InP1", "RTC::TimedShort", "VarInP1", 0));
- dataport.add(new DataPortParam("InP2", "RTC::TimedLong", "", 0));
- rtcParam.getInports().addAll(dataport);
- List<DataPortParam> outport = new ArrayList<DataPortParam>();
- outport.add(new DataPortParam("OutP1", "RTC::TimedLong", "", 0));
- outport.add(new DataPortParam("OutP2", "RTC::TimedFloat", "VarOutP2", 0));
- rtcParam.getOutports().addAll(outport);
-
- Generator generator = new Generator();
- GenerateManager manager = new PythonGenerateManager();
- generator.addGenerateManager(manager);
- List<GeneratedResult> result = generator.generateTemplateCode(genParam);
-
- String resourceDir = rootPath + "\\resource\\Python\\Variable\\DataPort\\";
-
- checkCode(result, resourceDir, "foo.py");
- checkCode(result, resourceDir, "README.foo");
- }
-}
Deleted: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/VarTest.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/VarTest.java 2012-02-07 14:48:47 UTC (rev 258)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/VarTest.java 2012-02-10 16:57:54 UTC (rev 259)
@@ -1,214 +0,0 @@
-package jp.go.aist.rtm.rtcbuilder.python._test;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import jp.go.aist.rtm.rtcbuilder.Generator;
-import jp.go.aist.rtm.rtcbuilder.generator.GeneratedResult;
-import jp.go.aist.rtm.rtcbuilder.generator.param.ConfigSetParam;
-import jp.go.aist.rtm.rtcbuilder.generator.param.DataPortParam;
-import jp.go.aist.rtm.rtcbuilder.generator.param.GeneratorParam;
-import jp.go.aist.rtm.rtcbuilder.generator.param.RtcParam;
-import jp.go.aist.rtm.rtcbuilder.generator.param.ServicePortInterfaceParam;
-import jp.go.aist.rtm.rtcbuilder.generator.param.ServicePortParam;
-import jp.go.aist.rtm.rtcbuilder.manager.GenerateManager;
-import jp.go.aist.rtm.rtcbuilder.python.IRtcBuilderConstantsPython;
-import jp.go.aist.rtm.rtcbuilder.python.manager.PythonGenerateManager;
-
-public class VarTest extends TestBase {
-
- protected void setUp() throws Exception {
- }
-
- public void testConfigSetVar() throws Exception{
- GeneratorParam genParam = new GeneratorParam();
- RtcParam rtcParam = new RtcParam(genParam, true);
- rtcParam.setOutputProject(rootPath + "\\resource\\work");
- rtcParam.setLanguage(IRtcBuilderConstantsPython.LANG_PYTHON);
- rtcParam.setLanguageArg(IRtcBuilderConstantsPython.LANG_PYTHON_ARG);
- rtcParam.setName("foo");
- rtcParam.setDescription("MDesc");
- rtcParam.setVersion("1.0.3");
- rtcParam.setVender("TA2");
- rtcParam.setCategory("manip2");
- rtcParam.setComponentType("STATIC2");
- rtcParam.setActivityType("PERIODIC2");
- rtcParam.setMaxInstance(3);
- rtcParam.setRtmVersion("0.4.2");
-
- genParam.getRtcParams().add(rtcParam);
- List<ConfigSetParam> configset = new ArrayList<ConfigSetParam>();
- configset.add(new ConfigSetParam("int_param0","int","varname1","0"));
- configset.add(new ConfigSetParam("int_param1","int","","1"));
- configset.add(new ConfigSetParam("double_param0","double","varname2","0.11"));
- configset.add(new ConfigSetParam("str_param0","String","","hoge"));
- configset.add(new ConfigSetParam("str_param1","String","varname3","dara"));
- rtcParam.getConfigParams().addAll(configset);
-
- Generator generator = new Generator();
- GenerateManager manager = new PythonGenerateManager();
- generator.addGenerateManager(manager);
- List<GeneratedResult> result = generator.generateTemplateCode(genParam);
-
- String resourceDir = rootPath + "\\resource\\Python\\ConfigSet\\ConfigVar\\";
-
- checkCode(result, resourceDir, "foo.py");
- checkCode(result, resourceDir, "README.foo");
- }
-
- public void testConfigSetOriginal() throws Exception{
- GeneratorParam genParam = new GeneratorParam();
- RtcParam rtcParam = new RtcParam(genParam, true);
- rtcParam.setOutputProject(rootPath + "\\resource\\work");
- rtcParam.setLanguage(IRtcBuilderConstantsPython.LANG_PYTHON);
- rtcParam.setLanguageArg(IRtcBuilderConstantsPython.LANG_PYTHON_ARG);
- rtcParam.setName("foo");
- rtcParam.setDescription("MDesc");
- rtcParam.setVersion("1.0.3");
- rtcParam.setVender("TA2");
- rtcParam.setCategory("manip2");
- rtcParam.setComponentType("STATIC2");
- rtcParam.setActivityType("PERIODIC2");
- rtcParam.setMaxInstance(3);
- rtcParam.setRtmVersion("0.4.2");
-
- genParam.getRtcParams().add(rtcParam);
- List<ConfigSetParam> configset = new ArrayList<ConfigSetParam>();
- configset.add(new ConfigSetParam("int_param0","int","","0"));
- configset.add(new ConfigSetParam("int_param1","int","","1"));
- configset.add(new ConfigSetParam("double_param0","double","","0.11"));
- configset.add(new ConfigSetParam("str_param0","String","","hoge"));
- configset.add(new ConfigSetParam("str_param1","String","","dara"));
- rtcParam.getConfigParams().addAll(configset);
-
- Generator generator = new Generator();
- GenerateManager manager = new PythonGenerateManager();
- generator.addGenerateManager(manager);
- List<GeneratedResult> result = generator.generateTemplateCode(genParam);
-
- String resourceDir = rootPath + "\\resource\\Python\\ConfigSet\\configset3\\";
-
- checkCode(result, resourceDir, "foo.py");
- checkCode(result, resourceDir, "README.foo");
- }
-
- public void testDataPortVar() throws Exception{
- GeneratorParam genParam = new GeneratorParam();
- RtcParam rtcParam = new RtcParam(genParam, true);
- rtcParam.setOutputProject(rootPath + "\\resource\\work");
- rtcParam.setLanguage(IRtcBuilderConstantsPython.LANG_PYTHON);
- rtcParam.setLanguageArg(IRtcBuilderConstantsPython.LANG_PYTHON_ARG);
- rtcParam.setName("foo");
- rtcParam.setDescription("MDesc");
- rtcParam.setVersion("1.0.1");
- rtcParam.setVender("TA");
- rtcParam.setCategory("Manip");
- rtcParam.setComponentType("STATIC2");
- rtcParam.setActivityType("PERIODIC2");
- rtcParam.setRtmVersion("0.4.2");
- rtcParam.setMaxInstance(5);
- genParam.getRtcParams().add(rtcParam);
- List<DataPortParam> dataport = new ArrayList<DataPortParam>();
- dataport.add(new DataPortParam("InP1", "RTC::TimedShort", "InName1", 0));
- dataport.add(new DataPortParam("InP2", "RTC::TimedLong", "InNm2", 0));
- rtcParam.getInports().addAll(dataport);
- List<DataPortParam> outport = new ArrayList<DataPortParam>();
- outport.add(new DataPortParam("OutP1", "RTC::TimedLong", "OutName1", 0));
- outport.add(new DataPortParam("OutP2", "RTC::TimedFloat", "OutNme2", 0));
- rtcParam.getOutports().addAll(outport);
-
- ServicePortParam service1 = new ServicePortParam("svPort",0);
- List<ServicePortInterfaceParam> srvinterts = new ArrayList<ServicePortInterfaceParam>();
- ServicePortInterfaceParam int1 = new ServicePortInterfaceParam(service1, "acc", "", "",
- rootPath + "\\resource\\MyService.idl", "MyService", "", 0);
- srvinterts.add(int1);
- service1.getServicePortInterfaces().addAll(srvinterts);
- List<ServicePortParam> srvports = new ArrayList<ServicePortParam>();
- srvports.add(service1);
-
- ServicePortParam service2 = new ServicePortParam("cmPort",0);
- List<ServicePortInterfaceParam> srvinterts2 = new ArrayList<ServicePortInterfaceParam>();
- ServicePortInterfaceParam int2 = new ServicePortInterfaceParam(service2, "rate", "", "",
- rootPath + "\\resource\\DAQService.idl", "DAQService", "", 1);
- srvinterts2.add(int2);
- service2.getServicePortInterfaces().addAll(srvinterts2);
- srvports.add(service2);
-
- rtcParam.getServicePorts().addAll(srvports);
-
- Generator generator = new Generator();
- GenerateManager manager = new PythonGenerateManager();
- generator.addGenerateManager(manager);
- List<GeneratedResult> result = generator.generateTemplateCode(genParam);
-
- String resourceDir = rootPath + "\\resource\\Python\\PortVar\\";
-
- checkCode(result, resourceDir, "foo.py");
- checkCode(result, resourceDir, "MyService_idl.py");
- checkCode(result, resourceDir, "DAQService_idl.py");
- checkCode(result, resourceDir, "_GlobalIDL/__init__.py");
- checkCode(result, resourceDir, "_GlobalIDL__POA/__init__.py");
- checkCode(result, resourceDir, "MyService_idl_example.py");
- checkCode(result, resourceDir, "README.foo");
- }
-
- public void testOriginalPort() throws Exception{
- GeneratorParam genParam = new GeneratorParam();
- RtcParam rtcParam = new RtcParam(genParam, true);
- rtcParam.setOutputProject(rootPath + "\\resource\\work");
- rtcParam.setLanguage(IRtcBuilderConstantsPython.LANG_PYTHON);
- rtcParam.setLanguageArg(IRtcBuilderConstantsPython.LANG_PYTHON_ARG);
- rtcParam.setName("foo");
- rtcParam.setDescription("MDesc");
- rtcParam.setVersion("1.0.1");
- rtcParam.setVender("TA");
- rtcParam.setCategory("Manip");
- rtcParam.setComponentType("STATIC2");
- rtcParam.setActivityType("PERIODIC2");
- rtcParam.setRtmVersion("0.4.2");
- rtcParam.setMaxInstance(5);
- genParam.getRtcParams().add(rtcParam);
- List<DataPortParam> dataport = new ArrayList<DataPortParam>();
- dataport.add(new DataPortParam("InP1", "RTC::TimedShort", "", 0));
- dataport.add(new DataPortParam("InP2", "RTC::TimedLong", "", 0));
- rtcParam.getInports().addAll(dataport);
- List<DataPortParam> outport = new ArrayList<DataPortParam>();
- outport.add(new DataPortParam("OutP1", "RTC::TimedLong", "", 0));
- outport.add(new DataPortParam("OutP2", "RTC::TimedFloat", "", 0));
- rtcParam.getOutports().addAll(outport);
-
- ServicePortParam service1 = new ServicePortParam("svPort",0);
- List<ServicePortInterfaceParam> srvinterts = new ArrayList<ServicePortInterfaceParam>();
- ServicePortInterfaceParam int1 = new ServicePortInterfaceParam(service1, "acc", "", "",
- rootPath + "\\resource\\MyService.idl", "MyService", "", 0);
- srvinterts.add(int1);
- service1.getServicePortInterfaces().addAll(srvinterts);
- List<ServicePortParam> srvports = new ArrayList<ServicePortParam>();
- srvports.add(service1);
-
- ServicePortParam service2 = new ServicePortParam("cmPort",0);
- List<ServicePortInterfaceParam> srvinterts2 = new ArrayList<ServicePortInterfaceParam>();
- ServicePortInterfaceParam int2 = new ServicePortInterfaceParam(service2, "rate", "", "",
- rootPath + "\\resource\\DAQService.idl", "DAQService", "", 1);
- srvinterts2.add(int2);
- service2.getServicePortInterfaces().addAll(srvinterts2);
- srvports.add(service2);
-
- rtcParam.getServicePorts().addAll(srvports);
-
- Generator generator = new Generator();
- GenerateManager manager = new PythonGenerateManager();
- generator.addGenerateManager(manager);
- List<GeneratedResult> result = generator.generateTemplateCode(genParam);
-
- String resourceDir = rootPath + "\\resource\\Python\\service2\\";
-
- checkCode(result, resourceDir, "foo.py");
- checkCode(result, resourceDir, "MyService_idl.py");
- checkCode(result, resourceDir, "DAQService_idl.py");
- checkCode(result, resourceDir, "_GlobalIDL/__init__.py");
- checkCode(result, resourceDir, "_GlobalIDL__POA/__init__.py");
- checkCode(result, resourceDir, "MyService_idl_example.py");
- checkCode(result, resourceDir, "README.foo");
- }
-}
Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/_100/AISTTest.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/_100/AISTTest.java 2012-02-07 14:48:47 UTC (rev 258)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/_100/AISTTest.java 2012-02-10 16:57:54 UTC (rev 259)
@@ -78,7 +78,7 @@
String resourceDir = rootPath + "/resource/100/aist/AIST6/";
- assertEquals(11, result.size());
+ assertEquals(26, result.size());
checkCode(result, resourceDir, "test.py");
}
@@ -119,7 +119,7 @@
String resourceDir = rootPath + "/resource/100/aist/AIST4/";
- assertEquals(14, result.size());
+ assertEquals(29, result.size());
checkCode(result, resourceDir, "test.py");
checkCode(result, resourceDir, "MyService_idl_example.py");
checkCode(result, resourceDir, "idlcompile.bat");
@@ -171,7 +171,7 @@
String resourceDir = rootPath + "/resource/100/aist/AIST3/";
- assertEquals(14, result.size());
+ assertEquals(29, result.size());
checkCode(result, resourceDir, "test.py");
checkCode(result, resourceDir, "MyService_idl_example.py");
checkCode(result, resourceDir, "idlcompile.bat");
@@ -213,7 +213,7 @@
String resourceDir = rootPath + "/resource/100/aist/AIST2/";
- assertEquals(13, result.size());
+ assertEquals(28, result.size());
checkCode(result, resourceDir, "test.py");
checkCode(result, resourceDir, "idlcompile.bat");
checkCode(result, resourceDir, "idlcompile.sh");
@@ -246,7 +246,7 @@
String resourceDir = rootPath + "/resource/100/aist/AIST1/";
- assertEquals(14, result.size());
+ assertEquals(29, result.size());
checkCode(result, resourceDir, "test.py");
checkCode(result, resourceDir, "MyService_idl_example.py");
checkCode(result, resourceDir, "idlcompile.bat");
Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/_100/BaseTest.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/_100/BaseTest.java 2012-02-07 14:48:47 UTC (rev 258)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/_100/BaseTest.java 2012-02-10 16:57:54 UTC (rev 259)
@@ -83,7 +83,7 @@
String resourceDir = rootPath + "/resource/100/base/service2/";
- assertEquals(14, result.size());
+ assertEquals(29, result.size());
checkCode(result, resourceDir, "foo.py");
checkCode(result, resourceDir, "MyService_idl_example.py");
checkCode(result, resourceDir, "idlcompile.bat");
@@ -125,7 +125,7 @@
String resourceDir = rootPath + "/resource/100/base/service1/";
- assertEquals(14, result.size());
+ assertEquals(29, result.size());
checkCode(result, resourceDir, "foo.py");
checkCode(result, resourceDir, "MyService_idl_example.py");
checkCode(result, resourceDir, "idlcompile.bat");
@@ -156,7 +156,7 @@
String resourceDir = rootPath + "/resource/100/base/outport2/";
- assertEquals(11, result.size());
+ assertEquals(26, result.size());
checkCode(result, resourceDir, "foo.py");
}
@@ -183,7 +183,7 @@
String resourceDir = rootPath + "/resource/100/base/outport1/";
- assertEquals(11, result.size());
+ assertEquals(26, result.size());
checkCode(result, resourceDir, "foo.py");
}
@@ -207,7 +207,7 @@
String resourceDir = rootPath + "/resource/100/base/inport2/";
- assertEquals(11, result.size());
+ assertEquals(26, result.size());
checkCode(result, resourceDir, "foo.py");
}
@@ -230,7 +230,7 @@
String resourceDir = rootPath + "/resource/100/base/inport1/";
- assertEquals(11, result.size());
+ assertEquals(26, result.size());
checkCode(result, resourceDir, "foo.py");
}
@@ -249,7 +249,7 @@
String resourceDir = rootPath + "/resource/100/base/name2/";
- assertEquals(11, result.size());
+ assertEquals(26, result.size());
checkCode(result, resourceDir, "Foo.py");
}
@@ -271,7 +271,7 @@
String resourceDir = rootPath + "/resource/100/base/name/";
- assertEquals(2, result.size());
+ assertEquals(4, result.size());
checkCode(result, resourceDir, "foo.py");
}
Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/_100/BuildTest.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/_100/BuildTest.java 2012-02-07 14:48:47 UTC (rev 258)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/_100/BuildTest.java 2012-02-10 16:57:54 UTC (rev 259)
@@ -89,21 +89,21 @@
String resourceDir = fixturePath(name) + "/";
- assertEquals(14, result.size());
+ assertEquals(29, result.size());
checkCode(result, resourceDir, "foo.py");
checkCode(result, resourceDir, "MyService_idl_example.py");
checkCode(result, resourceDir, "idlcompile.bat");
checkCode(result, resourceDir, "idlcompile.sh");
//
- checkCode(result, resourceDir, "CMakeLists.txt");
- checkCode(result, resourceDir, "Doxyfile.in");
- checkCode(result, resourceDir, "cmake_modules/cmake_uninstall.cmake.in");
- checkCode(result, resourceDir, "cmake_modules/CPackWIX.cmake");
- checkCode(result, resourceDir, "cmake_modules/FindOpenRTMPython.cmake");
- checkCode(result, resourceDir, "cpack_resources/Description.txt");
- checkCode(result, resourceDir, "cpack_resources/License.txt");
- checkCode(result, resourceDir, "cpack_resources/License.rtf");
- checkCode(result, resourceDir, "cpack_resources/wix.xsl.in");
+// checkCode(result, resourceDir, "CMakeLists.txt");
+// checkCode(result, resourceDir, "Doxyfile.in");
+// checkCode(result, resourceDir, "cmake_modules/cmake_uninstall.cmake.in");
+// checkCode(result, resourceDir, "cmake_modules/CPackWIX.cmake");
+// checkCode(result, resourceDir, "cmake_modules/FindOpenRTMPython.cmake");
+// checkCode(result, resourceDir, "cpack_resources/Description.txt");
+// checkCode(result, resourceDir, "cpack_resources/License.txt");
+// checkCode(result, resourceDir, "cpack_resources/License.rtf");
+// checkCode(result, resourceDir, "cpack_resources/wix.xsl.in");
}
public void testCMake2() throws Exception {
@@ -157,22 +157,22 @@
String resourceDir = fixturePath(name) + "/";
- assertEquals(15, result.size());
+ assertEquals(30, result.size());
checkCode(result, resourceDir, "foo.py");
checkCode(result, resourceDir, "MyServiceChildMulti_idl_example.py");
checkCode(result, resourceDir, "MyServiceChildWithType_idl_example.py");
checkCode(result, resourceDir, "idlcompile.bat");
checkCode(result, resourceDir, "idlcompile.sh");
//
- checkCode(result, resourceDir, "CMakeLists.txt");
- checkCode(result, resourceDir, "Doxyfile.in");
- checkCode(result, resourceDir, "cmake_modules/cmake_uninstall.cmake.in");
- checkCode(result, resourceDir, "cmake_modules/CPackWIX.cmake");
- checkCode(result, resourceDir, "cmake_modules/FindOpenRTMPython.cmake");
- checkCode(result, resourceDir, "cpack_resources/Description.txt");
- checkCode(result, resourceDir, "cpack_resources/License.txt");
- checkCode(result, resourceDir, "cpack_resources/License.rtf");
- checkCode(result, resourceDir, "cpack_resources/wix.xsl.in");
+// checkCode(result, resourceDir, "CMakeLists.txt");
+// checkCode(result, resourceDir, "Doxyfile.in");
+// checkCode(result, resourceDir, "cmake_modules/cmake_uninstall.cmake.in");
+// checkCode(result, resourceDir, "cmake_modules/CPackWIX.cmake");
+// checkCode(result, resourceDir, "cmake_modules/FindOpenRTMPython.cmake");
+// checkCode(result, resourceDir, "cpack_resources/Description.txt");
+// checkCode(result, resourceDir, "cpack_resources/License.txt");
+// checkCode(result, resourceDir, "cpack_resources/License.rtf");
+// checkCode(result, resourceDir, "cpack_resources/wix.xsl.in");
}
}
Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/_100/ConfigSetTest.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/_100/ConfigSetTest.java 2012-02-07 14:48:47 UTC (rev 258)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/_100/ConfigSetTest.java 2012-02-10 16:57:54 UTC (rev 259)
@@ -54,7 +54,7 @@
String resourceDir = rootPath + "/resource/100/ConfigSet/configset1/";
- assertEquals(11, result.size());
+ assertEquals(26, result.size());
checkCode(result, resourceDir, "foo.py");
}
@@ -78,7 +78,7 @@
String resourceDir = rootPath + "/resource/100/ConfigSet/configset2/";
- assertEquals(11, result.size());
+ assertEquals(26, result.size());
checkCode(result, resourceDir, "foo.py");
}
@@ -106,7 +106,7 @@
String resourceDir = rootPath + "/resource/100/ConfigSet/configset3/";
- assertEquals(11, result.size());
+ assertEquals(26, result.size());
checkCode(result, resourceDir, "foo.py");
}
@@ -136,7 +136,7 @@
String resourceDir = rootPath + "/resource/100/ConfigSet/configset4/";
- assertEquals(11, result.size());
+ assertEquals(26, result.size());
checkCode(result, resourceDir, "foo.py");
}
@@ -165,7 +165,7 @@
String resourceDir = rootPath
+ "/resource/100/ConfigSet/ConfigSetType/";
- assertEquals(11, result.size());
+ assertEquals(26, result.size());
checkCode(result, resourceDir, "foo.py");
}
}
Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/_100/PyDocTest.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/_100/PyDocTest.java 2012-02-07 14:48:47 UTC (rev 258)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/_100/PyDocTest.java 2012-02-10 16:57:54 UTC (rev 259)
@@ -262,7 +262,7 @@
String resourceDir = rootPath + "/resource/100/Doc/full/";
- assertEquals(14, result.size());
+ assertEquals(29, result.size());
checkCode(result, resourceDir, "foo.py");
checkCode(result, resourceDir, "MyService_idl_example.py");
checkCode(result, resourceDir, "idlcompile.bat");
@@ -321,7 +321,7 @@
String resourceDir = rootPath + "/resource/100/Doc/refer/";
- assertEquals(14, result.size());
+ assertEquals(29, result.size());
checkCode(result, resourceDir, "foo.py");
checkCode(result, resourceDir, "MyService_idl_example.py");
checkCode(result, resourceDir, "idlcompile.bat");
@@ -376,7 +376,7 @@
String resourceDir = rootPath + "/resource/100/Doc/authorLong/";
- assertEquals(14, result.size());
+ assertEquals(29, result.size());
checkCode(result, resourceDir, "foo.py");
checkCode(result, resourceDir, "MyService_idl_example.py");
checkCode(result, resourceDir, "idlcompile.bat");
@@ -430,7 +430,7 @@
String resourceDir = rootPath + "/resource/100/Doc/author/";
- assertEquals(14, result.size());
+ assertEquals(29, result.size());
checkCode(result, resourceDir, "foo.py");
checkCode(result, resourceDir, "MyService_idl_example.py");
checkCode(result, resourceDir, "idlcompile.bat");
Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/_100/PyIDLInheritTest.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/_100/PyIDLInheritTest.java 2012-02-07 14:48:47 UTC (rev 258)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/_100/PyIDLInheritTest.java 2012-02-10 16:57:54 UTC (rev 259)
@@ -81,7 +81,7 @@
String resourceDir = fixturePath(name) + "/";
- assertEquals(14, result.size());
+ assertEquals(29, result.size());
checkCode(result, resourceDir, "foo.py");
checkCode(result, resourceDir, "MyServiceChildMulti_idl_example.py");
checkCode(result, resourceDir, "idlcompile.bat");
@@ -129,7 +129,7 @@
String resourceDir = fixturePath(name) + "/";
- assertEquals(15, result.size());
+ assertEquals(30, result.size());
checkCode(result, resourceDir, "foo.py");
checkCode(result, resourceDir, "MyServiceChildMulti_idl_example.py");
checkCode(result, resourceDir, "MyServiceChildWithType_idl_example.py");
Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/_100/PyIDLType.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/_100/PyIDLType.java 2012-02-07 14:48:47 UTC (rev 258)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/_100/PyIDLType.java 2012-02-10 16:57:54 UTC (rev 259)
@@ -96,7 +96,7 @@
String resourceDir = rootPath + "/resource/100/idltype/type2/";
- assertEquals(14, result.size());
+ assertEquals(29, result.size());
checkCode(result, resourceDir, "test.py");
checkCode(result, resourceDir, "MyService_idl_example.py");
checkCode(result, resourceDir, "idlcompile.bat");
@@ -130,7 +130,7 @@
String resourceDir = rootPath + "/resource/100/idltype/type3/";
- assertEquals(14, result.size());
+ assertEquals(29, result.size());
checkCode(result, resourceDir, "test.py");
checkCode(result, resourceDir, "MyService_idl_example.py");
checkCode(result, resourceDir, "idlcompile.bat");
Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/_100/PyImplTest.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/_100/PyImplTest.java 2012-02-07 14:48:47 UTC (rev 258)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/_100/PyImplTest.java 2012-02-10 16:57:54 UTC (rev 259)
@@ -61,7 +61,7 @@
String resourceDir = rootPath + "/resource/100/impl/all/";
- assertEquals(11, result.size());
+ assertEquals(26, result.size());
checkCode(result, resourceDir, "foo.py");
}
@@ -86,7 +86,7 @@
String resourceDir = rootPath + "/resource/100/impl/execute/";
- assertEquals(11, result.size());
+ assertEquals(26, result.size());
checkCode(result, resourceDir, "foo.py");
}
@@ -108,7 +108,7 @@
String resourceDir = rootPath + "/resource/100/impl/finalize/";
- assertEquals(11, result.size());
+ assertEquals(26, result.size());
checkCode(result, resourceDir, "foo.py");
}
@@ -129,7 +129,7 @@
String resourceDir = rootPath + "/resource/100/impl/initialize/";
- assertEquals(11, result.size());
+ assertEquals(26, result.size());
checkCode(result, resourceDir, "foo.py");
}
Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/_100/PyModuleTest.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/_100/PyModuleTest.java 2012-02-07 14:48:47 UTC (rev 258)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/test/jp/go/aist/rtm/rtcbuilder/python/_test/_100/PyModuleTest.java 2012-02-10 16:57:54 UTC (rev 259)
@@ -64,7 +64,7 @@
String resourceDir = rootPath + "/resource/100/module/serviceM/";
- assertEquals(14, result.size());
+ assertEquals(29, result.size());
checkCode(result, resourceDir, "foo.py");
checkCode(result, resourceDir, "MyService_idl_example.py");
checkCode(result, resourceDir, "idlcompile.bat");
@@ -104,7 +104,7 @@
String resourceDir = rootPath + "/resource/100/module/serviceM2/";
- assertEquals(15, result.size());
+ assertEquals(30, result.size());
checkCode(result, resourceDir, "foo.py");
checkCode(result, resourceDir, "MyService_idl_example.py");
checkCode(result, resourceDir, "DAQService_idl_example.py");
@@ -140,7 +140,7 @@
String resourceDir = rootPath + "/resource/100/module/serviceMC/";
- assertEquals(13, result.size());
+ assertEquals(28, result.size());
checkCode(result, resourceDir, "foo.py");
}
@@ -177,7 +177,7 @@
String resourceDir = rootPath + "/resource/100/module/serviceMC2/";
- assertEquals(13, result.size());
+ assertEquals(28, result.size());
checkCode(result, resourceDir, "foo.py");
}
openrtm-commit メーリングリストの案内