summaryrefslogtreecommitdiffstats
path: root/src/test/CppTests/Templates.test.ts
diff options
context:
space:
mode:
authorto-s <to-s@users.noreply.github.com>2021-05-08 00:47:21 +0200
committerChristoph Schlosser <2466365+cschlosser@users.noreply.github.com>2021-05-08 21:01:49 +0200
commitddd24fe12bfb3557f422c1c8dc1d5464d2961c34 (patch)
treeabd59e9b0f80fac1b828926d1194ea7cff364e21 /src/test/CppTests/Templates.test.ts
parent54aaa131a116ac63f918b222ca46faeb61efd1e9 (diff)
downloaddoxdocgen-ddd24fe12bfb3557f422c1c8dc1d5464d2961c34.tar.gz
Reordered assertion parameter in tests
Due to https://github.com/cschlosser/doxdocgen/issues/218
Diffstat (limited to 'src/test/CppTests/Templates.test.ts')
-rw-r--r--src/test/CppTests/Templates.test.ts22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/test/CppTests/Templates.test.ts b/src/test/CppTests/Templates.test.ts
index d1831e6..18a2022 100644
--- a/src/test/CppTests/Templates.test.ts
+++ b/src/test/CppTests/Templates.test.ts
@@ -20,39 +20,39 @@ suite("C++ - Template tests", () => {
const result = testSetup.SetLine("template<typename T, std::size_t M, std::size_t N,"
+ "typename = typename std::enable_if<std::is_arithmetic<T>::value, T>::type>"
+ "class matrix {").GetResult();
- assert.strictEqual("/**\n * @brief \n * \n * @tparam T \n * @tparam M \n * @tparam N \n * "
- + "@tparam std::enable_if<std::is_arithmetic<T>::value, T>::type \n */", result);
+ assert.strictEqual(result, "/**\n * @brief \n * \n * @tparam T \n * @tparam M \n * @tparam N \n * "
+ + "@tparam std::enable_if<std::is_arithmetic<T>::value, T>::type \n */");
});
test("Template function", () => {
const result = testSetup.SetLine("template<typename T, typename S>\nT f(T a, S b);").GetResult();
- assert.strictEqual("/**\n * @brief \n * \n * @tparam T \n * @tparam S \n * @param a \n * "
- + "@param b \n * @return T \n */", result);
+ assert.strictEqual(result, "/**\n * @brief \n * \n * @tparam T \n * @tparam S \n * @param a \n * "
+ + "@param b \n * @return T \n */");
});
test("Double template", () => {
const result = testSetup.SetLine("template<typename T>\ntemplate<typename S>\nT f(T a, S b);").GetResult();
- assert.strictEqual("/**\n * @brief \n * \n * @tparam T \n * @tparam S \n * @param a \n * "
- + "@param b \n * @return T \n */", result);
+ assert.strictEqual(result, "/**\n * @brief \n * \n * @tparam T \n * @tparam S \n * @param a \n * "
+ + "@param b \n * @return T \n */");
});
test("Template struct", () => {
const result = testSetup.SetLine("template<typename T, std::size_t m, std::size_t n>\n"
+ "struct myStruct {").GetResult();
- assert.strictEqual("/**\n * @brief \n * \n * @tparam T \n * @tparam m \n * @tparam n \n */", result);
+ assert.strictEqual(result, "/**\n * @brief \n * \n * @tparam T \n * @tparam m \n * @tparam n \n */");
});
test("Variadic template", () => {
const result = testSetup.SetLine("template<typename T, typename... Args>"
+ "\nT adder(T first, Args... args);").GetResult();
- assert.strictEqual("/**\n * @brief \n * \n * @tparam T \n * @tparam Args \n *"
- + " @param first \n * @param args \n * @return T \n */", result);
+ assert.strictEqual(result, "/**\n * @brief \n * \n * @tparam T \n * @tparam Args \n *"
+ + " @param first \n * @param args \n * @return T \n */");
});
test("Default template param value", () => {
const result = testSetup.SetLine("template <bool is_foo=false, bool is_bar =true, bool is_nothrow = true>"
+ "\nstruct Foo;").GetResult();
- assert.strictEqual("/**\n * @brief \n * \n * @tparam is_foo \n * @tparam is_bar \n *"
- + " @tparam is_nothrow \n */", result);
+ assert.strictEqual(result, "/**\n * @brief \n * \n * @tparam is_foo \n * @tparam is_bar \n *"
+ + " @tparam is_nothrow \n */");
});
});