2 GTSAM Copyright 2010-2020, Georgia Tech Research Corporation, 3 Atlanta, Georgia 30332-0415 6 See LICENSE for the license information 8 Tests for interface_parser. 19 sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
22 Enumerator, ForwardDeclaration,
23 GlobalFunction, Include, Method, Module,
24 Namespace, Operator, ReturnType,
25 StaticMethod, TemplatedType, Type,
26 TypedefTemplateInstantiation, Typename,
32 """Test driver for all classes in interface_parser.py.""" 35 """Test parsing of Typename.""" 36 typename = Typename.rule.parseString(
"size_t")[0]
37 self.assertEqual(
"size_t", typename.name)
40 """Tests for BasicType.""" 42 t = Type.rule.parseString(
"int x")[0]
43 self.assertEqual(
"int", t.typename.name)
44 self.assertTrue(t.is_basic)
47 t = Type.rule.parseString(
"const int x")[0]
48 self.assertEqual(
"int", t.typename.name)
49 self.assertTrue(t.is_basic)
50 self.assertTrue(t.is_const)
53 t = Type.rule.parseString(
"int* x")[0]
54 self.assertEqual(
"int", t.typename.name)
55 self.assertTrue(t.is_shared_ptr)
58 t = Type.rule.parseString(
"int@ x")[0]
59 self.assertEqual(
"int", t.typename.name)
60 self.assertTrue(t.is_ptr)
63 t = Type.rule.parseString(
"int& x")[0]
64 self.assertEqual(
"int", t.typename.name)
65 self.assertTrue(t.is_ref)
68 t = Type.rule.parseString(
"const int& x")[0]
69 self.assertEqual(
"int", t.typename.name)
70 self.assertTrue(t.is_const)
71 self.assertTrue(t.is_ref)
74 """Tests for CustomType.""" 76 t = Type.rule.parseString(
"gtsam::Pose3 x")[0]
77 self.assertEqual(
"Pose3", t.typename.name)
78 self.assertEqual([
"gtsam"], t.typename.namespaces)
79 self.assertTrue(
not t.is_basic)
82 t = Type.rule.parseString(
"const gtsam::Pose3 x")[0]
83 self.assertEqual(
"Pose3", t.typename.name)
84 self.assertEqual([
"gtsam"], t.typename.namespaces)
85 self.assertTrue(t.is_const)
88 t = Type.rule.parseString(
"gtsam::Pose3* x")[0]
89 self.assertEqual(
"Pose3", t.typename.name)
90 self.assertEqual([
"gtsam"], t.typename.namespaces)
91 self.assertTrue(t.is_shared_ptr)
92 self.assertEqual(
"std::shared_ptr<gtsam::Pose3>", t.to_cpp())
95 t = Type.rule.parseString(
"gtsam::Pose3@ x")[0]
96 self.assertEqual(
"Pose3", t.typename.name)
97 self.assertEqual([
"gtsam"], t.typename.namespaces)
98 self.assertTrue(t.is_ptr)
101 t = Type.rule.parseString(
"gtsam::Pose3& x")[0]
102 self.assertEqual(
"Pose3", t.typename.name)
103 self.assertEqual([
"gtsam"], t.typename.namespaces)
104 self.assertTrue(t.is_ref)
107 t = Type.rule.parseString(
"const gtsam::Pose3& x")[0]
108 self.assertEqual(
"Pose3", t.typename.name)
109 self.assertEqual([
"gtsam"], t.typename.namespaces)
110 self.assertTrue(t.is_const)
111 self.assertTrue(t.is_ref)
114 """Test a templated type.""" 115 t = TemplatedType.rule.parseString(
"Eigen::Matrix<double, 3, 4>")[0]
116 self.assertEqual(
"Matrix", t.typename.name)
117 self.assertEqual([
"Eigen"], t.typename.namespaces)
118 self.assertEqual(
"double", t.typename.instantiations[0].name)
119 self.assertEqual(
"3", t.typename.instantiations[1].name)
120 self.assertEqual(
"4", t.typename.instantiations[2].name)
122 t = TemplatedType.rule.parseString(
123 "gtsam::PinholeCamera<gtsam::Cal3S2>")[0]
124 self.assertEqual(
"PinholeCamera", t.typename.name)
125 self.assertEqual([
"gtsam"], t.typename.namespaces)
126 self.assertEqual(
"Cal3S2", t.typename.instantiations[0].name)
127 self.assertEqual([
"gtsam"], t.typename.instantiations[0].namespaces)
129 t = TemplatedType.rule.parseString(
"PinholeCamera<Cal3S2*>")[0]
130 self.assertEqual(
"PinholeCamera", t.typename.name)
131 self.assertEqual(
"Cal3S2", t.typename.instantiations[0].name)
132 self.assertTrue(t.template_params[0].is_shared_ptr)
135 """Test no arguments.""" 136 empty_args = ArgumentList.rule.parseString(
"")[0]
137 self.assertEqual(0,
len(empty_args))
140 """Test arguments list for a method/function.""" 141 arg_string =
"int a, C1 c1, C2& c2, C3* c3, "\
142 "const C4 c4, const C5& c5,"\
144 args = ArgumentList.rule.parseString(arg_string)[0]
146 self.assertEqual(7,
len(args.list()))
147 self.assertEqual([
'a',
'c1',
'c2',
'c3',
'c4',
'c5',
'c6'],
152 Test arguments list where the arguments are qualified with `const` 153 and can be either raw pointers, shared pointers or references. 155 arg_string =
"double x1, double* x2, double& x3, double@ x4, " \
156 "const double x5, const double* x6, const double& x7, const double@ x8" 157 args = ArgumentList.rule.parseString(arg_string)[0].
list()
158 self.assertEqual(8,
len(args))
159 self.assertFalse(args[1].ctype.is_ptr
and args[1].ctype.is_shared_ptr
160 and args[1].ctype.is_ref)
161 self.assertTrue(args[1].ctype.is_shared_ptr)
162 self.assertTrue(args[2].ctype.is_ref)
163 self.assertTrue(args[3].ctype.is_ptr)
164 self.assertTrue(args[4].ctype.is_const)
165 self.assertTrue(args[5].ctype.is_shared_ptr
and args[5].ctype.is_const)
166 self.assertTrue(args[6].ctype.is_ref
and args[6].ctype.is_const)
167 self.assertTrue(args[7].ctype.is_ptr
and args[7].ctype.is_const)
170 """Test arguments list where the arguments can be templated.""" 171 arg_string =
"std::pair<string, double> steps, vector<T*> vector_of_pointers" 172 args = ArgumentList.rule.parseString(arg_string)[0]
173 args_list = args.list()
174 self.assertEqual(2,
len(args_list))
175 self.assertEqual(
"std::pair<string, double>",
176 args_list[0].ctype.to_cpp())
177 self.assertEqual(
"vector<std::shared_ptr<T>>",
178 args_list[1].ctype.to_cpp())
181 """Tests any expression that is a valid default argument""" 182 args = ArgumentList.rule.parseString(
""" 183 string c = "", int z = 0, double z2 = 0.0, bool f = false, 184 string s="hello"+"goodbye", char c='a', int a=3, 185 int b, double pi = 3.1415""")[0].
list()
188 self.assertEqual(args[0].default,
'""')
189 self.assertEqual(args[1].default,
'0')
190 self.assertEqual(args[2].default,
'0.0')
191 self.assertEqual(args[3].default,
"false")
192 self.assertEqual(args[4].default,
'"hello"+"goodbye"')
193 self.assertEqual(args[5].default,
"'a'")
194 self.assertEqual(args[6].default,
'3')
196 self.assertIsNone(args[7].default)
197 self.assertEqual(args[8].default,
'3.1415')
199 arg0 =
'gtsam::DefaultKeyFormatter' 200 arg1 =
'std::vector<size_t>()' 202 arg3 =
'[&c1, &c2](string s=5, int a){return s+"hello"+a+c1+c2;}' 203 arg4 =
'gtsam::Pose3()' 204 arg5 =
'Factor<gtsam::Pose3, gtsam::Point3>()' 205 arg6 =
'gtsam::Point3(1, 2, 3)' 206 arg7 =
'ns::Class<T, U>(3, 2, 1, "name")' 209 gtsam::KeyFormatter kf = {arg0}, 210 std::vector<size_t> v = {arg1}, 211 std::vector<size_t> l = {arg2}, 212 gtsam::KeyFormatter lambda = {arg3}, 213 gtsam::Pose3 p = {arg4}, 214 Factor<gtsam::Pose3, gtsam::Point3> x = {arg5}, 215 gtsam::Point3 x = {arg6}, 216 ns::Class<T, U> obj = {arg7} 225 args = ArgumentList.rule.parseString(argument_list)[0].
list()
228 self.assertEqual(args[0].default, arg0)
230 self.assertEqual(args[1].default, arg1)
231 self.assertEqual(args[2].default, arg2)
232 self.assertEqual(args[3].default, arg3)
233 self.assertEqual(args[4].default, arg4)
234 self.assertEqual(args[5].default, arg5)
235 self.assertEqual(args[6].default, arg6)
237 self.assertEqual(args[7].default, arg7)
240 """Test ReturnType""" 242 return_type = ReturnType.rule.parseString(
"void")[0]
243 self.assertEqual(
"void", return_type.type1.typename.name)
244 self.assertTrue(return_type.type1.is_basic)
247 return_type = ReturnType.rule.parseString(
"size_t")[0]
248 self.assertEqual(
"size_t", return_type.type1.typename.name)
249 self.assertTrue(
not return_type.type2)
250 self.assertTrue(return_type.type1.is_basic)
253 return_type = ReturnType.rule.parseString(
"int&")[0]
254 self.assertEqual(
"int", return_type.type1.typename.name)
255 self.assertTrue(return_type.type1.is_basic
256 and return_type.type1.is_ref)
258 return_type = ReturnType.rule.parseString(
"const int")[0]
259 self.assertEqual(
"int", return_type.type1.typename.name)
260 self.assertTrue(return_type.type1.is_basic
261 and return_type.type1.is_const)
264 return_type = ReturnType.rule.parseString(
"pair<char, int>")[0]
265 self.assertEqual(
"char", return_type.type1.typename.name)
266 self.assertEqual(
"int", return_type.type2.typename.name)
268 return_type = ReturnType.rule.parseString(
"pair<Test ,Test*>")[0]
269 self.assertEqual(
"Test", return_type.type1.typename.name)
270 self.assertEqual(
"Test", return_type.type2.typename.name)
271 self.assertTrue(return_type.type2.is_shared_ptr)
274 """Test for a class method.""" 275 ret = Method.rule.parseString(
"int f();")[0]
276 self.assertEqual(
"f", ret.name)
277 self.assertEqual(0,
len(ret.args))
278 self.assertTrue(
not ret.is_const)
280 ret = Method.rule.parseString(
"int f() const;")[0]
281 self.assertEqual(
"f", ret.name)
282 self.assertEqual(0,
len(ret.args))
283 self.assertTrue(ret.is_const)
285 ret = Method.rule.parseString(
286 "int f(const int x, const Class& c, Class* t) const;")[0]
287 self.assertEqual(
"f", ret.name)
288 self.assertEqual(3,
len(ret.args))
290 ret = Method.rule.parseString(
291 "pair<First ,Second*> create_MixedPtrs();")[0]
292 self.assertEqual(
"create_MixedPtrs", ret.name)
293 self.assertEqual(0,
len(ret.args))
294 self.assertEqual(
"First", ret.return_type.type1.typename.name)
295 self.assertEqual(
"Second", ret.return_type.type2.typename.name)
298 """Test for static methods.""" 299 ret = StaticMethod.rule.parseString(
"static int f();")[0]
300 self.assertEqual(
"f", ret.name)
301 self.assertEqual(0,
len(ret.args))
303 ret = StaticMethod.rule.parseString(
304 "static int f(const int x, const Class& c, Class* t);")[0]
305 self.assertEqual(
"f", ret.name)
306 self.assertEqual(3,
len(ret.args))
309 """Test for class constructor.""" 310 ret = Constructor.rule.parseString(
"f();")[0]
311 self.assertEqual(
"f", ret.name)
312 self.assertEqual(0,
len(ret.args))
314 ret = Constructor.rule.parseString(
315 "f(const int x, const Class& c, Class* t);")[0]
316 self.assertEqual(
"f", ret.name)
317 self.assertEqual(3,
len(ret.args))
319 ret = Constructor.rule.parseString(
320 """ForwardKinematics(const gtdynamics::Robot& robot, 321 const string& start_link_name, const string& end_link_name, 322 const gtsam::Values& joint_angles, 323 const gtsam::Pose3& l2Tp = gtsam::Pose3());""")[0]
324 self.assertEqual(
"ForwardKinematics", ret.name)
325 self.assertEqual(5,
len(ret.args))
326 self.assertEqual(
"gtsam::Pose3()", ret.args.list()[4].default)
329 """Test for templated class constructor.""" 331 template<T = {double, int}> 334 ret = Constructor.rule.parseString(f)[0]
335 self.assertEqual(
"Class", ret.name)
336 self.assertEqual(0,
len(ret.args))
339 template<T = {double, int}> 340 Class(const T& name); 342 ret = Constructor.rule.parseString(f)[0]
343 self.assertEqual(
"Class", ret.name)
344 self.assertEqual(1,
len(ret.args))
345 self.assertEqual(
"const T & name", ret.args.args_list[0].to_cpp())
348 """Test for operator overloading.""" 350 wrap_string =
"gtsam::Vector2 operator-() const;" 351 ret = Operator.rule.parseString(wrap_string)[0]
352 self.assertEqual(
"operator", ret.name)
353 self.assertEqual(
"-", ret.operator)
354 self.assertEqual(
"Vector2", ret.return_type.type1.typename.name)
355 self.assertEqual(
"gtsam::Vector2",
356 ret.return_type.type1.typename.to_cpp())
357 self.assertTrue(
len(ret.args) == 0)
358 self.assertTrue(ret.is_unary)
361 wrap_string =
"gtsam::Vector2 operator*(const gtsam::Vector2 &v) const;" 362 ret = Operator.rule.parseString(wrap_string)[0]
363 self.assertEqual(
"operator", ret.name)
364 self.assertEqual(
"*", ret.operator)
365 self.assertEqual(
"Vector2", ret.return_type.type1.typename.name)
366 self.assertEqual(
"gtsam::Vector2",
367 ret.return_type.type1.typename.to_cpp())
368 self.assertTrue(
len(ret.args) == 1)
369 self.assertEqual(
"const gtsam::Vector2 &",
370 repr(ret.args.list()[0].ctype))
371 self.assertTrue(
not ret.is_unary)
374 """Test for typedef'd instantiation of a template.""" 375 typedef = TypedefTemplateInstantiation.rule.parseString(
""" 376 typedef gtsam::BearingFactor<gtsam::Pose2, gtsam::Point2, gtsam::Rot2> 379 self.assertEqual(
"BearingFactor2D", typedef.new_name)
380 self.assertEqual(
"BearingFactor", typedef.typename.name)
381 self.assertEqual([
"gtsam"], typedef.typename.namespaces)
382 self.assertEqual(3,
len(typedef.typename.instantiations))
385 """Test a base class.""" 386 ret = Class.rule.parseString(
""" 390 self.assertEqual(
"Base", ret.name)
391 self.assertEqual(0,
len(ret.ctors))
392 self.assertEqual(0,
len(ret.methods))
393 self.assertEqual(0,
len(ret.static_methods))
394 self.assertEqual(0,
len(ret.properties))
395 self.assertTrue(ret.is_virtual)
398 """Test an empty class declaration.""" 399 ret = Class.rule.parseString(
""" 400 class FactorIndices {}; 402 self.assertEqual(
"FactorIndices", ret.name)
403 self.assertEqual(0,
len(ret.ctors))
404 self.assertEqual(0,
len(ret.methods))
405 self.assertEqual(0,
len(ret.static_methods))
406 self.assertEqual(0,
len(ret.properties))
407 self.assertTrue(
not ret.is_virtual)
410 """Test a non-trivial class.""" 411 ret = Class.rule.parseString(
""" 412 class SymbolicFactorGraph { 413 SymbolicFactorGraph(); 414 SymbolicFactorGraph(const gtsam::SymbolicBayesNet& bayesNet); 415 SymbolicFactorGraph(const gtsam::SymbolicBayesTree& bayesTree); 417 // Dummy static method 418 static gtsam::SymbolidFactorGraph CreateGraph(); 420 void push_back(gtsam::SymbolicFactor* factor); 421 void print(string s) const; 422 bool equals(const gtsam::SymbolicFactorGraph& rhs, double tol) const; 424 bool exists(size_t idx) const; 426 // Standard interface 427 gtsam::KeySet keys() const; 428 void push_back(const gtsam::SymbolicFactorGraph& graph); 429 void push_back(const gtsam::SymbolicBayesNet& bayesNet); 430 void push_back(const gtsam::SymbolicBayesTree& bayesTree); 432 /* Advanced interface */ 433 void push_factor(size_t key); 434 void push_factor(size_t key1, size_t key2); 435 void push_factor(size_t key1, size_t key2, size_t key3); 436 void push_factor(size_t key1, size_t key2, size_t key3, size_t key4); 438 gtsam::SymbolicBayesNet* eliminateSequential(); 439 gtsam::SymbolicBayesNet* eliminateSequential( 440 const gtsam::Ordering& ordering); 441 gtsam::SymbolicBayesTree* eliminateMultifrontal(); 442 gtsam::SymbolicBayesTree* eliminateMultifrontal( 443 const gtsam::Ordering& ordering); 444 pair<gtsam::SymbolicBayesNet*, gtsam::SymbolicFactorGraph*> 445 eliminatePartialSequential(const gtsam::Ordering& ordering); 446 pair<gtsam::SymbolicBayesNet*, gtsam::SymbolicFactorGraph*> 447 eliminatePartialSequential(const gtsam::KeyVector& keys); 448 pair<gtsam::SymbolicBayesTree*, gtsam::SymbolicFactorGraph*> 449 eliminatePartialMultifrontal(const gtsam::Ordering& ordering); 450 gtsam::SymbolicBayesNet* marginalMultifrontalBayesNet( 451 const gtsam::Ordering& ordering); 452 gtsam::SymbolicBayesNet* marginalMultifrontalBayesNet( 453 const gtsam::KeyVector& key_vector, 454 const gtsam::Ordering& marginalizedVariableOrdering); 455 gtsam::SymbolicFactorGraph* marginal(const gtsam::KeyVector& key_vector); 459 self.assertEqual(
"SymbolicFactorGraph", ret.name)
460 self.assertEqual(3,
len(ret.ctors))
461 self.assertEqual(23,
len(ret.methods))
462 self.assertEqual(1,
len(ret.static_methods))
463 self.assertEqual(0,
len(ret.properties))
464 self.assertTrue(
not ret.is_virtual)
467 """Test a templated class.""" 468 ret = Class.rule.parseString(
""" 469 template<POSE, POINT> 473 self.assertEqual(
"MyFactor", ret.name)
474 self.assertEqual(
"<POSE, POINT>",
repr(ret.template))
477 """Test for class inheritance.""" 478 ret = Class.rule.parseString(
""" 479 virtual class Null: gtsam::noiseModel::mEstimator::Base { 481 void print(string s) const; 482 static gtsam::noiseModel::mEstimator::Null* Create(); 484 // enabling serialization functionality 485 void serializable() const; 488 self.assertEqual(
"Null", ret.name)
489 self.assertEqual(1,
len(ret.ctors))
490 self.assertEqual(2,
len(ret.methods))
491 self.assertEqual(1,
len(ret.static_methods))
492 self.assertEqual(0,
len(ret.properties))
493 self.assertEqual(
"Base", ret.parent_class.name)
494 self.assertEqual([
"gtsam",
"noiseModel",
"mEstimator"],
495 ret.parent_class.namespaces)
496 self.assertTrue(ret.is_virtual)
498 ret = Class.rule.parseString(
499 "class ForwardKinematicsFactor : gtsam::BetweenFactor<gtsam::Pose3> {};" 503 self.assertEqual(
"ForwardKinematicsFactor", ret.name)
504 self.assertEqual(
"BetweenFactor", ret.parent_class.name)
505 self.assertEqual([
"gtsam"], ret.parent_class.namespaces)
506 self.assertEqual(
"Pose3", ret.parent_class.instantiations[0].name)
507 self.assertEqual([
"gtsam"],
508 ret.parent_class.instantiations[0].namespaces)
511 """Test for class with nested enum.""" 512 ret = Class.rule.parseString(
""" 514 Pet(const string &name, Kind type); 515 enum Kind { Dog, Cat }; 518 self.assertEqual(ret.name,
"Pet")
519 self.assertEqual(ret.enums[0].name,
"Kind")
522 """Test for include statements.""" 523 include = Include.rule.parseString(
524 "#include <gtsam/slam/PriorFactor.h>")[0]
525 self.assertEqual(
"gtsam/slam/PriorFactor.h", include.header)
528 """Test for forward declarations.""" 529 fwd = ForwardDeclaration.rule.parseString(
530 "virtual class Test:gtsam::Point3;")[0]
532 self.assertEqual(
"Test", fwd.name)
533 self.assertTrue(fwd.is_virtual)
536 """Test for global/free function.""" 537 func = GlobalFunction.rule.parseString(
""" 538 gtsam::Values localToWorld(const gtsam::Values& local, 539 const gtsam::Pose2& base, const gtsam::KeyVector& keys); 541 self.assertEqual(
"localToWorld", func.name)
542 self.assertEqual(
"Values", func.return_type.type1.typename.name)
543 self.assertEqual(3,
len(func.args))
546 """Test for global variable.""" 547 variable = Variable.rule.parseString(
"string kGravity;")[0]
548 self.assertEqual(variable.name,
"kGravity")
549 self.assertEqual(variable.ctype.typename.name,
"string")
551 variable = Variable.rule.parseString(
"string kGravity = 9.81;")[0]
552 self.assertEqual(variable.name,
"kGravity")
553 self.assertEqual(variable.ctype.typename.name,
"string")
554 self.assertEqual(variable.default,
"9.81")
556 variable = Variable.rule.parseString(
557 "const string kGravity = 9.81;")[0]
558 self.assertEqual(variable.name,
"kGravity")
559 self.assertEqual(variable.ctype.typename.name,
"string")
560 self.assertTrue(variable.ctype.is_const)
561 self.assertEqual(variable.default,
"9.81")
563 variable = Variable.rule.parseString(
564 "gtsam::Pose3 wTc = gtsam::Pose3();")[0]
565 self.assertEqual(variable.name,
"wTc")
566 self.assertEqual(variable.ctype.typename.name,
"Pose3")
567 self.assertEqual(variable.default,
"gtsam::Pose3()")
569 variable = Variable.rule.parseString(
570 "gtsam::Pose3 wTc = gtsam::Pose3(1, 2, 0);")[0]
571 self.assertEqual(variable.name,
"wTc")
572 self.assertEqual(variable.ctype.typename.name,
"Pose3")
573 self.assertEqual(variable.default,
"gtsam::Pose3(1, 2, 0)")
576 """Test for enumerator.""" 577 enumerator = Enumerator.rule.parseString(
"Dog")[0]
578 self.assertEqual(enumerator.name,
"Dog")
580 enumerator = Enumerator.rule.parseString(
"Cat")[0]
581 self.assertEqual(enumerator.name,
"Cat")
584 """Test for enums.""" 585 enum = Enum.rule.parseString(
""" 591 self.assertEqual(enum.name,
"Kind")
592 self.assertEqual(enum.enumerators[0].name,
"Dog")
593 self.assertEqual(enum.enumerators[1].name,
"Cat")
596 """Test for namespace parsing.""" 597 namespace = Namespace.rule.parseString(
""" 599 #include <gtsam/geometry/Point2.h> 602 Point2(double x, double y); 606 char returnChar() const; 607 void argChar(char a) const; 608 void argUChar(unsigned char a) const; 611 #include <gtsam/geometry/Point3.h> 613 Point3(double x, double y, double z); 616 // static functions - use static keyword and uppercase 617 static double staticFunction(); 618 static gtsam::Point3 StaticFunctionRet(double z); 620 // enabling serialization functionality 621 void serialize() const; // Just triggers a flag internally 624 self.assertEqual(
"gtsam", namespace.name)
627 """Test module parsing.""" 628 module = Module.parseString(
""" 638 namespace two_dummy { 639 namespace three_dummy{ 642 namespace fourth_dummy{ 659 self.assertEqual([
"one",
"Global",
"globalVar"],
660 [x.name
for x
in module.content])
661 self.assertEqual([
"two",
"two_dummy",
"two",
"oneVar"],
662 [x.name
for x
in module.content[0].content])
665 if __name__ ==
'__main__':
def test_empty_class(self)
def test_empty_arguments(self)
def test_argument_list_templated(self)
def test_operator_overload(self)
def test_constructor_templated(self)
def test_class_inheritance(self)
def test_return_type(self)
def test_base_class(self)
def test_argument_list(self)
def test_global_variable(self)
def test_class_with_enum(self)
def test_forward_declaration(self)
def test_basic_type(self)
def test_templated_class(self)
std::string format(const std::string &str, const std::vector< std::string > &find, const std::vector< std::string > &replace)
def test_static_method(self)
def test_templated_type(self)
size_t len(handle h)
Get the length of a Python object.
def test_default_arguments(self)
def test_enumerator(self)
def test_typedef_template_instantiation(self)
def test_argument_list_qualifiers(self)
def test_constructor(self)
def test_custom_type(self)