-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Restructure test files in prep for additional categories, increase cov
Increase patch coverage where it was lacking for #27, #94, and #8. Added new tests so all assertions are now covered, and added negative testing for all assertions. Restructure Assertions test files so there's a paradigm for adding new assertion categories. Updated CMake build to take this into account.
- Loading branch information
Showing
8 changed files
with
416 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
#ifndef TESTCPP_ASSERTIONS_SUITE_ | ||
#define TESTCPP_ASSERTIONS_SUITE_ | ||
|
||
#include "BasicAssertionsTests.h" | ||
|
||
namespace TestCPP { | ||
namespace Testing { | ||
namespace AssertionsSuites { | ||
TestSuite basicSuite( | ||
"TestCPP Basic Assertions Tests", | ||
|
||
make_tuple( | ||
"Basic Assertion - assertEquals Test", | ||
function<void()>(AssertionsTests::TestAssertEquals) | ||
), | ||
make_tuple( | ||
"Basic Assertion - assertEquals Not Equal Test", | ||
function<void()>(AssertionsTests::TestAssertEqualsNotEqual) | ||
), | ||
make_tuple( | ||
"Basic Assertion - assertEquals C Strings Test", | ||
function<void()>(AssertionsTests::TestAssertEqualsCStrings) | ||
), | ||
make_tuple( | ||
"Basic Assertion - assertEquals C Strings Not Equal Test", | ||
function<void()>(AssertionsTests::TestAssertEqualsCStringsNotEqual) | ||
), | ||
make_tuple( | ||
"Basic Assertion - assertNotEquals Test", | ||
function<void()>(AssertionsTests::TestAssertNotEquals) | ||
), | ||
make_tuple( | ||
"Basic Assertion - assertNotEquals Equal Test", | ||
function<void()>(AssertionsTests::TestAssertNotEqualsEqual) | ||
), | ||
make_tuple( | ||
"Basic Assertion - assertNotEquals C Strings Test", | ||
function<void()>(AssertionsTests::TestAssertNotEqualsCStrings) | ||
), | ||
make_tuple( | ||
"Basic Assertion - assertNotEquals C Strings Equal Test", | ||
function<void()>(AssertionsTests::TestAssertNotEqualsCStringsEqual) | ||
), | ||
make_tuple( | ||
"Basic Assertion - assertNull Test", | ||
function<void()>(AssertionsTests::TestAssertNull) | ||
), | ||
make_tuple( | ||
"Basic Assertion - assertNull not null Test", | ||
function<void()>(AssertionsTests::TestAssertNullNotNull) | ||
), | ||
make_tuple( | ||
"Basic Assertion - assertNotNull Test", | ||
function<void()>(AssertionsTests::TestAssertNotNull) | ||
), | ||
make_tuple( | ||
"Basic Assertion - assertNotNull null Test", | ||
function<void()>(AssertionsTests::TestAssertNotNullNull) | ||
), | ||
make_tuple( | ||
"Basic Assertion - assertThrows Test", | ||
function<void()>(AssertionsTests::TestAssertThrows) | ||
), | ||
make_tuple( | ||
"Basic Assertion - assertThrows Does Not Throw Test", | ||
function<void()>(AssertionsTests::TestAssertThrowsDoesNotThrow) | ||
), | ||
make_tuple( | ||
"Basic Assertion - assertNoThrows Test", | ||
function<void()>(AssertionsTests::TestAssertNoThrows) | ||
), | ||
make_tuple( | ||
"Basic Assertion - assertNoThrows Throws Test", | ||
function<void()>(AssertionsTests::TestAssertNoThrowsThrows) | ||
), | ||
make_tuple( | ||
"Basic Assertion - assertTrue Test", | ||
function<void()>(AssertionsTests::TestAssertTrue) | ||
), | ||
make_tuple( | ||
"Basic Assertion - assertTrue not true Test", | ||
function<void()>(AssertionsTests::TestAssertTrueNotTrue) | ||
), | ||
make_tuple( | ||
"Basic Assertion - assertFalse Test", | ||
function<void()>(AssertionsTests::TestAssertFalse) | ||
), | ||
make_tuple( | ||
"Basic Assertion - assertFalse not false Test", | ||
function<void()>(AssertionsTests::TestAssertFalseNotFalse) | ||
), | ||
make_tuple( | ||
"Basic Assertion - fail Test", | ||
function<void()>(AssertionsTests::TestFail) | ||
) | ||
); | ||
} | ||
} | ||
} | ||
|
||
#endif |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#ifndef TESTCPP_ASSERTIONS_TESTS_ | ||
#define TESTCPP_ASSERTIONS_TESTS_ | ||
|
||
namespace TestCPP { | ||
namespace Testing { | ||
namespace AssertionsTests { | ||
void TestAssertEquals (); | ||
void TestAssertEqualsNotEqual (); | ||
void TestAssertEqualsCStrings (); | ||
void TestAssertEqualsCStringsNotEqual (); | ||
void TestAssertNotEquals (); | ||
void TestAssertNotEqualsEqual (); | ||
void TestAssertNotEqualsCStrings (); | ||
void TestAssertNotEqualsCStringsEqual (); | ||
void TestAssertNull (); | ||
void TestAssertNullNotNull (); | ||
void TestAssertNotNull (); | ||
void TestAssertNotNullNull (); | ||
void TestAssertThrows (); | ||
void TestAssertThrowsDoesNotThrow (); | ||
void TestAssertNoThrows (); | ||
void TestAssertNoThrowsThrows (); | ||
void TestAssertTrue (); | ||
void TestAssertTrueNotTrue (); | ||
void TestAssertFalse (); | ||
void TestAssertFalseNotFalse (); | ||
void TestFail (); | ||
} | ||
} | ||
} | ||
|
||
#endif |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.