summaryrefslogtreecommitdiffstats
path: root/src/test/CppTests
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/CppTests')
-rw-r--r--src/test/CppTests/FunctionPointer.test.ts5
-rw-r--r--src/test/CppTests/Parameters.test.ts5
2 files changed, 10 insertions, 0 deletions
diff --git a/src/test/CppTests/FunctionPointer.test.ts b/src/test/CppTests/FunctionPointer.test.ts
index a353380..7a4383c 100644
--- a/src/test/CppTests/FunctionPointer.test.ts
+++ b/src/test/CppTests/FunctionPointer.test.ts
@@ -39,4 +39,9 @@ suite("C++ - Function pointer Tests", () => {
assert.equal("/**\n * @brief \n * \n * @param puts \n * @param str "
+ "\n * @return const struct foo(*)(const char*) \n */", result);
});
+
+ test("Memberpointer in function pointer", () => {
+ const result = testSetup.SetLine("void foo(void (SomeClass::* func)());").GetResult();
+ assert.equal("/**\n * @brief \n * \n * @param func \n */", result);
+ });
});
diff --git a/src/test/CppTests/Parameters.test.ts b/src/test/CppTests/Parameters.test.ts
index 8505826..6e7293b 100644
--- a/src/test/CppTests/Parameters.test.ts
+++ b/src/test/CppTests/Parameters.test.ts
@@ -252,4 +252,9 @@ suite("C++ - Parameters Tests", () => {
const result = testSetup.SetLine("void foo(double a1 = 0xa.bp10l_deg_test, int b);").GetResult();
assert.equal("/**\n * @brief \n * \n * @param a1 \n * @param b \n */", result);
});
+
+ test("Member pointer as parameter", () => {
+ const result = testSetup.SetLine("void test(int foo::* memberPointer);").GetResult();
+ assert.equal("/**\n * @brief \n * \n * @param memberPointer \n */", result);
+ });
});