summaryrefslogtreecommitdiffstats
path: root/src/test/CppTests/Templates.test.ts
diff options
context:
space:
mode:
authorto-s <tobias.weber@enisyst.de>2020-10-19 11:43:47 -0400
committerGitHub <noreply@github.com>2020-10-19 17:43:47 +0200
commitd629202dd9419569c109475ad9f10405d8ab0d22 (patch)
treeb496c943718ac65ff7676536f5643c92bb9590ab /src/test/CppTests/Templates.test.ts
parent0750262ca203baf9b8974d683df68f99a7b1c259 (diff)
downloaddoxdocgen-d629202dd9419569c109475ad9f10405d8ab0d22.tar.gz
Replaced assert.equal() calls by assert.strictEqual() calls (#188)
Due to message: deprecated since v9.9.0 - use strictEqual() instead.
Diffstat (limited to 'src/test/CppTests/Templates.test.ts')
-rw-r--r--src/test/CppTests/Templates.test.ts12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/test/CppTests/Templates.test.ts b/src/test/CppTests/Templates.test.ts
index 0c4e1b6..d1831e6 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.equal("/**\n * @brief \n * \n * @tparam T \n * @tparam M \n * @tparam N \n * "
+ 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);
});
test("Template function", () => {
const result = testSetup.SetLine("template<typename T, typename S>\nT f(T a, S b);").GetResult();
- assert.equal("/**\n * @brief \n * \n * @tparam T \n * @tparam S \n * @param a \n * "
+ assert.strictEqual("/**\n * @brief \n * \n * @tparam T \n * @tparam S \n * @param a \n * "
+ "@param b \n * @return T \n */", result);
});
test("Double template", () => {
const result = testSetup.SetLine("template<typename T>\ntemplate<typename S>\nT f(T a, S b);").GetResult();
- assert.equal("/**\n * @brief \n * \n * @tparam T \n * @tparam S \n * @param a \n * "
+ assert.strictEqual("/**\n * @brief \n * \n * @tparam T \n * @tparam S \n * @param a \n * "
+ "@param b \n * @return T \n */", result);
});
test("Template struct", () => {
const result = testSetup.SetLine("template<typename T, std::size_t m, std::size_t n>\n"
+ "struct myStruct {").GetResult();
- assert.equal("/**\n * @brief \n * \n * @tparam T \n * @tparam m \n * @tparam n \n */", result);
+ assert.strictEqual("/**\n * @brief \n * \n * @tparam T \n * @tparam m \n * @tparam n \n */", result);
});
test("Variadic template", () => {
const result = testSetup.SetLine("template<typename T, typename... Args>"
+ "\nT adder(T first, Args... args);").GetResult();
- assert.equal("/**\n * @brief \n * \n * @tparam T \n * @tparam Args \n *"
+ assert.strictEqual("/**\n * @brief \n * \n * @tparam T \n * @tparam Args \n *"
+ " @param first \n * @param args \n * @return T \n */", result);
});
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.equal("/**\n * @brief \n * \n * @tparam is_foo \n * @tparam is_bar \n *"
+ assert.strictEqual("/**\n * @brief \n * \n * @tparam is_foo \n * @tparam is_bar \n *"
+ " @tparam is_nothrow \n */", result);
});
});