예제 #1
0
 def testCreateDataPipeWithIncorrectParameters(self):
   options = system.CreateDataPipeOptions()
   options.element_num_bytes = 5
   options.capacity_num_bytes = DATA_SIZE
   with self.assertRaises(system.MojoException) as cm:
     self._TestDataHandleCreation(system.DataPipe(options))
   self.assertEquals(system.RESULT_INVALID_ARGUMENT, cm.exception.mojo_result)
예제 #2
0
 def testCreateDataPipeWithCapacity(self):
     options = system.CreateDataPipeOptions()
     options.element_capacity_num_bytes = DATA_SIZE
     self._TestDataHandleCreation(system.DataPipe(options))
예제 #3
0
 def testCreateDataPipeWithElementSize(self):
     options = system.CreateDataPipeOptions()
     options.element_num_bytes = 5
     self._TestDataHandleCreation(system.DataPipe(options))
예제 #4
0
 def testCreateDataPipeWithDiscardFlag(self):
     options = system.CreateDataPipeOptions()
     options.flags = system.CreateDataPipeOptions.FLAG_MAY_DISCARD
     self._TestDataHandleCreation(system.DataPipe(options))
예제 #5
0
 def testCreateDataPipeWithDefaultOptions(self):
     self._TestDataHandleCreation(
         system.DataPipe(system.CreateDataPipeOptions()))