summaryrefslogtreecommitdiffstats
path: root/src/test/CppTests/Preprocessor.test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/CppTests/Preprocessor.test.ts')
-rw-r--r--src/test/CppTests/Preprocessor.test.ts19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/test/CppTests/Preprocessor.test.ts b/src/test/CppTests/Preprocessor.test.ts
index c89a80a..7e4708b 100644
--- a/src/test/CppTests/Preprocessor.test.ts
+++ b/src/test/CppTests/Preprocessor.test.ts
@@ -30,4 +30,23 @@ suite("C++ - Preprocessor Tests", () => {
]).GetResult();
assert.equal("/**\n * @brief \n * \n */", result);
});
+
+ // These two tests don't seem to belong here but the behavior they're testing only is reproducable
+ // for macros otherwise
+ test("detect auto generated closing */", () => {
+ const result = testSetup.SetLines([
+ "*/", // simulate an auto generated closing block comment
+ "void foo(int bar);",
+ ]).GetResult();
+ assert.equal("/**\n * @brief \n * \n * @param bar \n */", result);
+ });
+
+ test("don't detect closing */", () => {
+ const result = testSetup.SetLines([
+ "/*",
+ " */",
+ "void foo(int bar);",
+ ]).GetResult();
+ assert.equal("/**\n * @brief \n * \n */", result);
+ });
});