Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 import OpenRTM_aist
00019 import RTC, RTC__POA
00020
00021 import sys
00022 sys.path.insert(1,"../")
00023
00024 import unittest
00025
00026 from DataPortStatus import *
00027
00028
00029 class TestDataPortStatus(unittest.TestCase):
00030 def setUp(self):
00031 self._dps = DataPortStatus()
00032
00033
00034 def test_toString(self):
00035 self.assertEqual(self._dps.toString(DataPortStatus.PORT_OK), "PORT_OK")
00036 self.assertEqual(self._dps.toString(DataPortStatus.PORT_ERROR), "PORT_ERROR")
00037 self.assertEqual(self._dps.toString(DataPortStatus.BUFFER_FULL), "BUFFER_FULL")
00038 self.assertEqual(self._dps.toString(DataPortStatus.BUFFER_EMPTY), "BUFFER_EMPTY")
00039 self.assertEqual(self._dps.toString(DataPortStatus.BUFFER_TIMEOUT), "BUFFER_TIMEOUT")
00040 self.assertEqual(self._dps.toString(DataPortStatus.SEND_FULL), "SEND_FULL")
00041 self.assertEqual(self._dps.toString(DataPortStatus.SEND_TIMEOUT), "SEND_TIMEOUT")
00042 self.assertEqual(self._dps.toString(DataPortStatus.RECV_EMPTY), "RECV_EMPTY")
00043 self.assertEqual(self._dps.toString(DataPortStatus.RECV_TIMEOUT), "RECV_TIMEOUT")
00044 self.assertEqual(self._dps.toString(DataPortStatus.INVALID_ARGS), "INVALID_ARGS")
00045 self.assertEqual(self._dps.toString(DataPortStatus.PRECONDITION_NOT_MET), "PRECONDITION_NOT_MET")
00046 self.assertEqual(self._dps.toString(DataPortStatus.CONNECTION_LOST), "CONNECTION_LOST")
00047 self.assertEqual(self._dps.toString(DataPortStatus.UNKNOWN_ERROR), "UNKNOWN_ERROR")
00048
00049
00050
00051 if __name__ == '__main__':
00052 unittest.main()