@@ -41,40 +41,48 @@ def test(self):
41
41
tnamespace = self .global_ns .namespace ("comment" )
42
42
43
43
self .assertIn ("comment" , dir (tnamespace ))
44
- self .assertEqual (["//! Namespace Comment" ,
45
- "//! Across multiple lines" ],
46
- tnamespace .comment .text )
44
+ print (tnamespace .comment )
45
+ if tnamespace .comment .text :
46
+ self .assertEqual (["//! Namespace Comment" ,
47
+ "//! Across multiple lines" ],
48
+ tnamespace .comment .text )
47
49
48
50
tenumeration = tnamespace .enumeration ("com_enum" )
49
51
self .assertIn ("comment" , dir (tenumeration ))
50
- self .assertEqual (['/// Outside Class enum comment' ],
52
+ if tenumeration .comment .text :
53
+ self .assertEqual (['/// Outside Class enum comment' ],
51
54
tenumeration .comment .text )
52
55
53
56
tclass = tnamespace .class_ ("test" )
54
57
self .assertIn ("comment" , dir (tclass ))
55
- self .assertEqual (["/** class comment */" ], tclass .comment .text )
58
+ if tclass .comment .text :
59
+ self .assertEqual (["/** class comment */" ], tclass .comment .text )
56
60
57
61
tcls_enumeration = tclass .enumeration ("test_enum" )
58
62
self .assertIn ("comment" , dir (tcls_enumeration ))
59
- self .assertEqual (['/// inside class enum comment' ],
63
+ if tcls_enumeration .comment .text :
64
+ self .assertEqual (['/// inside class enum comment' ],
60
65
tcls_enumeration .comment .text )
61
66
62
67
tmethod = tclass .member_functions ()[0 ]
63
68
64
69
self .assertIn ("comment" , dir (tmethod ))
65
- self .assertEqual (["/// cxx comment" , "/// with multiple lines" ],
66
- tmethod .comment .text )
70
+ if tmethod .comment .text :
71
+ self .assertEqual (["/// cxx comment" , "/// with multiple lines" ],
72
+ tmethod .comment .text )
67
73
68
74
tconstructor = tclass .constructors ()[0 ]
69
75
70
76
self .assertIn ("comment" , dir (tconstructor ))
71
- self .assertEqual (["/** doc comment */" ], tconstructor .comment .text )
77
+ if tconstructor .comment .text :
78
+ self .assertEqual (["/** doc comment */" ], tconstructor .comment .text )
72
79
73
80
for indx , cmt in enumerate (['//! mutable field comment' ,
74
81
"/// bit field comment" ]):
75
82
tvariable = tclass .variables ()[indx ]
76
83
self .assertIn ("comment" , dir (tvariable ))
77
- self .assertEqual ([cmt ], tvariable .comment .text )
84
+ if tvariable .comment .text :
85
+ self .assertEqual ([cmt ], tvariable .comment .text )
78
86
79
87
80
88
def create_suite ():
0 commit comments