diff options
Diffstat (limited to 'CST 126/UnitTester/UnitTester.cpp')
| -rw-r--r-- | CST 126/UnitTester/UnitTester.cpp | 43 |
1 files changed, 42 insertions, 1 deletions
diff --git a/CST 126/UnitTester/UnitTester.cpp b/CST 126/UnitTester/UnitTester.cpp index 1ad15fd..aa04fe1 100644 --- a/CST 126/UnitTester/UnitTester.cpp +++ b/CST 126/UnitTester/UnitTester.cpp @@ -1,7 +1,10 @@ #include "pch.h" #include "CppUnitTest.h" #include "SinglyLinkedList.hpp" +#include "crt_check_memory.hpp" + using namespace Microsoft::VisualStudio::CppUnitTestFramework; +using namespace CST_126; namespace LinkedListUnitTests { @@ -216,5 +219,43 @@ namespace LinkedListUnitTests //} + + + + + }; -} + TEST_CLASS(NodeUnitTests) + { + public: + const CrtCheckMemory Check; + + + TEST_METHOD(NodeConstructor_Success) + { + Node<int>* NewNode = new Node<int>(); + + Assert::IsNotNull(NewNode); + + + delete NewNode; + } + + + + TEST_METHOD(NodeLoadedConstructor_Success) + { + const CrtCheckMemory Check; + + Node<int>* NewNode = new Node<int>(5); + + Assert::IsNotNull(NewNode); + Assert::AreEqual(5, NewNode->Data()); + } + + + } + + + +}; |