diff options
| author | to-s <to-s@users.noreply.github.com> | 2021-05-08 00:47:21 +0200 |
|---|---|---|
| committer | Christoph Schlosser <2466365+cschlosser@users.noreply.github.com> | 2021-05-08 21:01:49 +0200 |
| commit | ddd24fe12bfb3557f422c1c8dc1d5464d2961c34 (patch) | |
| tree | abd59e9b0f80fac1b828926d1194ea7cff364e21 /src/test/CppTests/SmartText.test.ts | |
| parent | 54aaa131a116ac63f918b222ca46faeb61efd1e9 (diff) | |
| download | doxdocgen-ddd24fe12bfb3557f422c1c8dc1d5464d2961c34.tar.gz | |
Reordered assertion parameter in tests
Due to https://github.com/cschlosser/doxdocgen/issues/218
Diffstat (limited to 'src/test/CppTests/SmartText.test.ts')
| -rw-r--r-- | src/test/CppTests/SmartText.test.ts | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/src/test/CppTests/SmartText.test.ts b/src/test/CppTests/SmartText.test.ts index b407500..3c39bdd 100644 --- a/src/test/CppTests/SmartText.test.ts +++ b/src/test/CppTests/SmartText.test.ts @@ -19,97 +19,97 @@ suite("Smart Text Tests", () => { test("Disable smart text Ctor", () => { testSetup.cfg.Generic.generateSmartText = false; const result = testSetup.SetLine("Foo();").GetResult(); - assert.strictEqual("/**\n * @brief \n * \n */", result); + assert.strictEqual(result, "/**\n * @brief \n * \n */"); }); test("Disable smart text Dtor", () => { testSetup.cfg.Generic.generateSmartText = false; const result = testSetup.SetLine("~Foo();").GetResult(); - assert.strictEqual("/**\n * @brief \n * \n */", result); + assert.strictEqual(result, "/**\n * @brief \n * \n */"); }); test("Disable smart text getter", () => { testSetup.cfg.Generic.generateSmartText = false; const result = testSetup.SetLine("int getFoo();").GetResult(); - assert.strictEqual("/**\n * @brief \n * \n * @return int \n */", result); + assert.strictEqual(result, "/**\n * @brief \n * \n * @return int \n */"); }); test("Disable smart text setter", () => { testSetup.cfg.Generic.generateSmartText = false; const result = testSetup.SetLine("void setFoo(int foo);").GetResult(); - assert.strictEqual("/**\n * @brief \n * \n * @param foo \n */", result); + assert.strictEqual(result, "/**\n * @brief \n * \n * @param foo \n */"); }); test("Disable smart text factory method", () => { testSetup.cfg.Generic.generateSmartText = false; const result = testSetup.SetLine("int createFoo();").GetResult(); - assert.strictEqual("/**\n * @brief \n * \n * @return int \n */", result); + assert.strictEqual(result, "/**\n * @brief \n * \n * @return int \n */"); }); test("Standard smart text Ctor", () => { testSetup.cfg.Generic.generateSmartText = true; const result = testSetup.SetLine("Foo();").GetResult(); - assert.strictEqual("/**\n * @brief Construct a new Foo object\n * \n */", result); + assert.strictEqual(result, "/**\n * @brief Construct a new Foo object\n * \n */"); }); test("Standard smart text Dtor", () => { testSetup.cfg.Generic.generateSmartText = true; const result = testSetup.SetLine("~Foo();").GetResult(); - assert.strictEqual("/**\n * @brief Destroy the Foo object\n * \n */", result); + assert.strictEqual(result, "/**\n * @brief Destroy the Foo object\n * \n */"); }); test("Standard smart text getter", () => { testSetup.cfg.Generic.generateSmartText = true; const result = testSetup.SetLine("int getFoo();").GetResult(); - assert.strictEqual("/**\n * @brief Get the Foo object\n * \n * @return int \n */", result); + assert.strictEqual(result, "/**\n * @brief Get the Foo object\n * \n * @return int \n */"); }); test("Standard smart text setter", () => { testSetup.cfg.Generic.generateSmartText = true; const result = testSetup.SetLine("void setFoo(int foo);").GetResult(); - assert.strictEqual("/**\n * @brief Set the Foo object\n * \n * @param foo \n */", result); + assert.strictEqual(result, "/**\n * @brief Set the Foo object\n * \n * @param foo \n */"); }); test("Standard smart text factory method", () => { testSetup.cfg.Generic.generateSmartText = true; const result = testSetup.SetLine("int createFoo();").GetResult(); - assert.strictEqual("/**\n * @brief Create a Foo object\n * \n * @return int \n */", result); + assert.strictEqual(result, "/**\n * @brief Create a Foo object\n * \n * @return int \n */"); }); test("Casing text split: SCREAMING_SNAKE", () => { testSetup.cfg.Generic.generateSmartText = true; const result = testSetup.SetLine("int CREATE_FOO();").GetResult(); - assert.strictEqual("/**\n * @brief Create a foo object\n * \n * @return int \n */", result); + assert.strictEqual(result, "/**\n * @brief Create a foo object\n * \n * @return int \n */"); }); test("Casing text split: snake_case", () => { testSetup.cfg.Generic.generateSmartText = true; const result = testSetup.SetLine("int create_foo();").GetResult(); - assert.strictEqual("/**\n * @brief Create a foo object\n * \n * @return int \n */", result); + assert.strictEqual(result, "/**\n * @brief Create a foo object\n * \n * @return int \n */"); }); test("Casing text split: PascalCase", () => { testSetup.cfg.Generic.generateSmartText = true; const result = testSetup.SetLine("int CreateFoo();").GetResult(); - assert.strictEqual("/**\n * @brief Create a Foo object\n * \n * @return int \n */", result); + assert.strictEqual(result, "/**\n * @brief Create a Foo object\n * \n * @return int \n */"); }); test("Casing text split: camelCase", () => { testSetup.cfg.Generic.generateSmartText = true; const result = testSetup.SetLine("int createFoo();").GetResult(); - assert.strictEqual("/**\n * @brief Create a Foo object\n * \n * @return int \n */", result); + assert.strictEqual(result, "/**\n * @brief Create a Foo object\n * \n * @return int \n */"); }); test("Casing text split: UPPERCASE", () => { testSetup.cfg.Generic.generateSmartText = true; const result = testSetup.SetLine("int CREATEFOO();").GetResult(); - assert.strictEqual("/**\n * @brief Create a FOO object\n * \n * @return int \n */", result); + assert.strictEqual(result, "/**\n * @brief Create a FOO object\n * \n * @return int \n */"); }); test("Casing text split: UnCertain_CASE", () => { testSetup.cfg.Generic.generateSmartText = true; const result = testSetup.SetLine("int Create_FOO();").GetResult(); - assert.strictEqual("/**\n * @brief \n * \n * @return int \n */", result); + assert.strictEqual(result, "/**\n * @brief \n * \n * @return int \n */"); }); test("Casing text split: unidentifieable", () => { @@ -117,22 +117,22 @@ suite("Smart Text Tests", () => { // SCREAMING_SNAKE let result = testSetup.SetLine("int CREATE_foo();").GetResult(); - assert.strictEqual("/**\n * @brief \n * \n * @return int \n */", result); + assert.strictEqual(result, "/**\n * @brief \n * \n * @return int \n */"); // snake_case result = testSetup.SetLine("int create_FOO();").GetResult(); - assert.strictEqual("/**\n * @brief \n * \n * @return int \n */", result); + assert.strictEqual(result, "/**\n * @brief \n * \n * @return int \n */"); // Pascal result = testSetup.SetLine("int Createfoo();").GetResult(); - assert.strictEqual("/**\n * @brief \n * \n * @return int \n */", result); + assert.strictEqual(result, "/**\n * @brief \n * \n * @return int \n */"); // camel result = testSetup.SetLine("int createFOO();").GetResult(); - assert.strictEqual("/**\n * @brief \n * \n * @return int \n */", result); + assert.strictEqual(result, "/**\n * @brief \n * \n * @return int \n */"); // UPPER??? result = testSetup.SetLine("int CREATE_();").GetResult(); - assert.strictEqual("/**\n * @brief \n * \n * @return int \n */", result); + assert.strictEqual(result, "/**\n * @brief \n * \n * @return int \n */"); }); }); |