test_BufferStatus.py
Go to the documentation of this file.
00001 #!/usr/bin/env python
00002 # -*- Python -*-
00003 
00004 # \file test_BufferStatus.py
00005 # \brief test of BufferStatus class
00006 # \date $Date: 2007/09/12 $
00007 # \author Shinji Kurihara
00008 #
00009 # Copyright (C) 2009
00010 #     Noriaki Ando
00011 #     Task-intelligence Research Group,
00012 #     Intelligent Systems Research Institute,
00013 #     National Institute of
00014 #         Advanced Industrial Science and Technology (AIST), Japan
00015 #     All rights reserved.
00016 #
00017   
00018 import sys
00019 sys.path.insert(1,"../")
00020 
00021 import unittest
00022 
00023 from BufferStatus import *
00024 
00025 class MyBuffer(BufferStatus):
00026         def __init__(self):
00027                 pass
00028 
00029 class TestBufferStatus(unittest.TestCase):
00030         def setUp(self):
00031                 self.bf = MyBuffer()
00032 
00033 
00034         def test_toString(self):
00035                 self.assertEqual(self.bf.toString(BufferStatus.BUFFER_OK),"BUFFER_OK")
00036                 self.assertEqual(self.bf.toString(BufferStatus.BUFFER_ERROR),"BUFFER_ERROR")
00037                 self.assertEqual(self.bf.toString(BufferStatus.BUFFER_FULL),"BUFFER_FULL")
00038                 self.assertEqual(self.bf.toString(BufferStatus.BUFFER_EMPTY),"BUFFER_EMPTY")
00039                 self.assertEqual(self.bf.toString(BufferStatus.NOT_SUPPORTED),"NOT_SUPPORTED")
00040                 self.assertEqual(self.bf.toString(BufferStatus.TIMEOUT),"TIMEOUT")
00041                 self.assertEqual(self.bf.toString(BufferStatus.PRECONDITION_NOT_MET),"PRECONDITION_NOT_MET")
00042 
00043 
00044 
00045 ############### test #################
00046 if __name__ == '__main__':
00047         unittest.main()


openrtm_aist_python
Author(s): Shinji Kurihara
autogenerated on Thu Aug 27 2015 14:17:28