summaryrefslogtreecommitdiffstats
path: root/src/test/CppTests/Parameters.test.ts
diff options
context:
space:
mode:
authorDaan Huinink <daan@huinink.net>2020-05-27 11:27:30 +0200
committerGitHub <noreply@github.com>2020-05-27 11:27:30 +0200
commit07b6f8998d3daa3ce3e4d56376f0b69cd6e382ec (patch)
treee60584bb0395436d2fa9c8fe42b5e9f4a842679c /src/test/CppTests/Parameters.test.ts
parent38d5349b0e2b1177f45adc6a800360c32a6f70d1 (diff)
downloaddoxdocgen-07b6f8998d3daa3ce3e4d56376f0b69cd6e382ec.tar.gz
Fixed a bug where the argument type would be placed as the param instead of the argument name. (#154)
Diffstat (limited to 'src/test/CppTests/Parameters.test.ts')
-rw-r--r--src/test/CppTests/Parameters.test.ts15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/test/CppTests/Parameters.test.ts b/src/test/CppTests/Parameters.test.ts
index cfcebe8..d55bdd5 100644
--- a/src/test/CppTests/Parameters.test.ts
+++ b/src/test/CppTests/Parameters.test.ts
@@ -42,6 +42,21 @@ suite("C++ - Parameters Tests", () => {
assert.equal("/**\n * @brief \n * \n * @param a \n */", result);
});
+ test("Reference parameter with unsigned interger qualifier", () => {
+ const result = testSetup.SetLine("void foo(unsigned int& a);").GetResult();
+ assert.equal("/**\n * @brief \n * \n * @param a \n */", result);
+ });
+
+ test("Reference parameter with const qualifier", () => {
+ const result = testSetup.SetLine("void foo(const int& a);").GetResult();
+ assert.equal("/**\n * @brief \n * \n * @param a \n */", result);
+ });
+
+ test("Reference parameter with const and interger qualifier", () => {
+ const result = testSetup.SetLine("void foo(const unsigned int& a);").GetResult();
+ assert.equal("/**\n * @brief \n * \n * @param a \n */", result);
+ });
+
test("Pointer parameter", () => {
const result = testSetup.SetLine("void foo(int* a);").GetResult();
assert.equal("/**\n * @brief \n * \n * @param a \n */", result);