示例#1
0
 def testInt64(self):
     """Test that we can wrap C++ Control objects with int64 members."""
     config = testLib.OuterConfigObject()
     control = testLib.OuterControlObject()
     self.assertTrue(testLib.checkNestedControl(control, config.a.p, config.a.q, config.b))
     self.assertGreater(config.a.q, 1 << 30)
     self.assertGreater(control.a.q, 1 << 30)
示例#2
0
 def testDefaults(self):
     """Test that C++ Control object defaults are correctly used as defaults for Config objects."""
     config = testLib.OuterConfigObject()
     control = testLib.OuterControlObject()
     self.assertTrue(
         testLib.checkNestedControl(control, config.a.p, config.a.q,
                                    config.b))
示例#3
0
 def testReadControl(self):
     """Test reading the values from a C++ Control object into a Config object."""
     control = testLib.OuterControlObject()
     control.a.p = 6.0
     control.a.q = 4
     control.b = 3
     config = testLib.OuterConfigObject()
     config.readControl(control)
     self.assertTrue(testLib.checkNestedControl(control, config.a.p, config.a.q, config.b))