diff options
| author | reecepwarner <[email protected]> | 2024-05-29 12:44:24 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-05-29 12:44:24 -0700 |
| commit | a94e681196881e3f8fb18ecfd760ed3f59fa8ca1 (patch) | |
| tree | 46158946d1c7aa12c44acc6043bcc595523a0c88 /CST 126/UnitTest2/UnitTest2.cpp | |
| parent | homework2 completed (diff) | |
| download | homework-1-reecepwarner-a94e681196881e3f8fb18ecfd760ed3f59fa8ca1.tar.xz homework-1-reecepwarner-a94e681196881e3f8fb18ecfd760ed3f59fa8ca1.zip | |
Template node branch to Develop Branch (#3)
* init
* changes
* changes
* created insert and deletion functions
* unit testing homework3
* more unit tests
* unit tests added
* unit test and memory check added
* Template node
* essentially completed
---------
Co-authored-by: rPatrickWarner <[email protected]>
Diffstat (limited to 'CST 126/UnitTest2/UnitTest2.cpp')
| -rw-r--r-- | CST 126/UnitTest2/UnitTest2.cpp | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/CST 126/UnitTest2/UnitTest2.cpp b/CST 126/UnitTest2/UnitTest2.cpp new file mode 100644 index 0000000..6cbd9a5 --- /dev/null +++ b/CST 126/UnitTest2/UnitTest2.cpp @@ -0,0 +1,39 @@ +#include "pch.h" +#include "CppUnitTest.h" +#include "SinglyLinkedList.hpp" +using namespace Microsoft::VisualStudio::CppUnitTestFramework; + +namespace UnitTest2 +{ + { + TEST_CLASS(LinkedListUnitTests) + { + public: + + + TEST_METHOD(EmptyListHasZeroSize) + { + SinglyLinkedList linkedList{}; + + + + Assert::AreEqual(0ull, linkedlist._size); + } + + + + TEST_METHOD(AppendingLinkedList) + { + SinglyLinkedList linkedList{}; + ListNode* node = { + }; + node->_data = 5; + + bool success = Append(&linkedlist, node); + + Assert::AreEqual(5, linkedlist._head->_data); + } + }; + } + +} |