|
16 | 16 |
|
17 | 17 | #include "test/test_interface.h"
|
18 | 18 |
|
19 |
| -TestInterface::TestInterface() : called_constructor_info_("Constructor()") {} |
| 19 | +// static |
| 20 | +std::string TestInterface::last_call_info_; |
20 | 21 |
|
21 |
| -TestInterface::TestInterface(long createTime) |
22 |
| - : called_constructor_info_("Constructor(long)") {} |
| 22 | +TestInterface::TestInterface() { |
| 23 | + last_call_info_ = "Constructor()"; |
| 24 | +} |
23 | 25 |
|
24 |
| -TestInterface::TestInterface(long arg1, long arg2) |
25 |
| - : called_constructor_info_("Constructor(long, long)") {} |
| 26 | +TestInterface::TestInterface(long number) { |
| 27 | + last_call_info_ = "Constructor(long)"; |
| 28 | +} |
26 | 29 |
|
27 |
| -TestInterface::TestInterface(const std::string& msg1, const std::string& msg2) |
28 |
| - : called_constructor_info_("Constructor(string, string)") {} |
| 30 | +TestInterface::TestInterface(long number1, long number2) { |
| 31 | + last_call_info_ = "Constructor(long, long)"; |
| 32 | +} |
| 33 | + |
| 34 | +TestInterface::TestInterface(const std::string& string1, |
| 35 | + const std::string& string2) { |
| 36 | + last_call_info_ = "Constructor(string, string)"; |
| 37 | +} |
| 38 | + |
| 39 | +const std::string& TestInterface::GetLastCallInfo() { |
| 40 | + return last_call_info_; |
| 41 | +} |
| 42 | + |
| 43 | +void TestInterface::StaticMethod1() { |
| 44 | + last_call_info_ = "static void staticMethod1()"; |
| 45 | +} |
29 | 46 |
|
30 |
| -const std::string& TestInterface::GetCalledConstructorInfo() const { |
31 |
| - return called_constructor_info_; |
| 47 | +bool TestInterface::StaticMethod2(long number, const std::string& string) { |
| 48 | + last_call_info_ = "static boolean staticMethod2(long, string)"; |
| 49 | + return 0; |
32 | 50 | }
|
0 commit comments