Skip to content

Commit bd9f1ed

Browse files
committed
struct support
1 parent 6e283e1 commit bd9f1ed

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

gmock.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ def __get_mock_methods(self, node, mock_methods, class_decl = ""):
189189
name[len(node.spelling) + 1 : -1]
190190
)
191191
)
192-
elif node.kind in [CursorKind.CLASS_DECL, CursorKind.NAMESPACE]:
192+
elif node.kind in [CursorKind.STRUCT_DECL, CursorKind.CLASS_DECL, CursorKind.NAMESPACE]:
193193
class_decl = class_decl == "" and name or class_decl + (name == "" and "" or "::") + name
194194
if class_decl.startswith(self.decl):
195195
[self.__get_mock_methods(c, mock_methods, class_decl) for c in node.get_children()]

test/given/I3I4.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@
44
namespace n1 {
55
namespace {
66

7-
class I3
7+
struct I3
88
{
9-
public:
109
virtual ~I3() { }
1110

1211
virtual void f0() {

0 commit comments

Comments
 (0)