summaryrefslogtreecommitdiffstats
path: root/src/test
diff options
context:
space:
mode:
authorChristoph Schlosser <christophschlosser@users.noreply.github.com>2018-07-06 19:59:46 +0200
committerGitHub <noreply@github.com>2018-07-06 19:59:46 +0200
commit63412efa8aa51ffb76afc5a5adec7ea3354e973a (patch)
treed683d45085230737e596de4d8227230ae68224d0 /src/test
parente281cee46f5efc972d1ae4c36edcf1eb31763280 (diff)
parent534158f43af43dd2580172d52e38a543a2b2fedf (diff)
downloaddoxdocgen-63412efa8aa51ffb76afc5a5adec7ea3354e973a.tar.gz
Merge pull request #81 from christophschlosser/memberpointer
Parse member pointers correctly
Diffstat (limited to 'src/test')
-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);
+ });
});