diff options
Diffstat (limited to 'CST 126/LinkedListUnitTests')
| -rw-r--r-- | CST 126/LinkedListUnitTests/LinkedListUnitTests.cpp | 519 | ||||
| -rw-r--r-- | CST 126/LinkedListUnitTests/LinkedListUnitTests.vcxproj | 174 | ||||
| -rw-r--r-- | CST 126/LinkedListUnitTests/LinkedListUnitTests.vcxproj.filters | 30 | ||||
| -rw-r--r-- | CST 126/LinkedListUnitTests/pch.cpp | 5 | ||||
| -rw-r--r-- | CST 126/LinkedListUnitTests/pch.h | 12 |
5 files changed, 740 insertions, 0 deletions
diff --git a/CST 126/LinkedListUnitTests/LinkedListUnitTests.cpp b/CST 126/LinkedListUnitTests/LinkedListUnitTests.cpp new file mode 100644 index 0000000..15defc0 --- /dev/null +++ b/CST 126/LinkedListUnitTests/LinkedListUnitTests.cpp @@ -0,0 +1,519 @@ +#include "pch.h" +#include "CppUnitTest.h" + +#include <list> + +using namespace Microsoft::VisualStudio::CppUnitTestFramework; + +#include "SinglyLinkedList.hpp"; + +namespace LinkedListUnitTests +{ + TEST_CLASS(LinkedListUnitTests) + { + public: + std::list<int> my_list{1, 5, 6, 7 ,9, 10}; + + //Empty + TEST_METHOD(EmptyListHasZeroSize) + { + //Arrange + SinglyLinkedList linkedList{}; + + //Assert + Assert::AreEqual(0ull, linkedList._size); + } + + //Append + TEST_METHOD(AppendingLinkedList) + { + //Arrange + struct SinglyLinkedList linkedList = {}; + + ListNode node = {5, nullptr}; + + //Act + bool success = Append(&linkedList, &node); + + //Assert + Assert::AreEqual(5, linkedList._head->_data); + Assert::AreEqual(1ull, linkedList._size); + + + } + + TEST_METHOD(MultipleAppend_LinkedList_Success) + { + //Arrange + struct SinglyLinkedList linkedList = {}; + + ListNode node1 = { 1, nullptr }; + ListNode node2 = { 2, nullptr }; + ListNode node3 = { 3, nullptr }; + ListNode node4 = { 4, nullptr }; + ListNode node5 = { 5, nullptr }; + + //Act + bool success = Append(&linkedList, &node1); + success = Append(&linkedList, &node2); + success = Append(&linkedList, &node3); + success = Append(&linkedList, &node4); + success = Append(&linkedList, &node5); + + Assert::AreEqual(node1._data, linkedList._head->_data); + + ListNode* travel = linkedList._head; + //Assert + for (auto i = 1; i <= 5; i++) + { + Assert::AreEqual(i, travel->_data); + travel = travel->_next; + + } + + } + + //Prepend + TEST_METHOD(OnePrependLinkedList) + { + //Arrange + struct SinglyLinkedList linkedList = {}; + + ListNode node = { 5, nullptr }; + + //Act + bool success = Prepend(&linkedList, &node); + + //Assert + Assert::AreEqual(5, linkedList._head->_data); + Assert::AreEqual(1ull, linkedList._size); + + + } + + TEST_METHOD(MultiplePrepend_LinkedList_Success) + { + //Arrange + struct SinglyLinkedList linkedList = {}; + + ListNode node1 = { 1, nullptr }; + ListNode node2 = { 2, nullptr }; + ListNode node3 = { 3, nullptr }; + ListNode node4 = { 4, nullptr }; + ListNode node5 = { 5, nullptr }; + + //Act + bool success = Prepend(&linkedList, &node1); + success = Prepend(&linkedList, &node2); + success = Prepend(&linkedList, &node3); + success = Prepend(&linkedList, &node4); + success = Prepend(&linkedList, &node5); + + Assert::AreEqual(node5._data, linkedList._head->_data); + + ListNode* travel = linkedList._head; + //Assert + for (auto i = 5; i >= 1; i--) + { + Assert::AreEqual(i, travel->_data); + travel = travel->_next; + + } + + } + + //RemoveFirst + TEST_METHOD(RemoveFirstNode_LinkedList_Success) + { + struct SinglyLinkedList linkedList = {}; + + ListNode node1 = { 1, nullptr }; + ListNode node2 = { 2, nullptr }; + ListNode node3 = { 3, nullptr }; + ListNode node4 = { 4, nullptr }; + ListNode node5 = { 5, nullptr }; + + //Act + bool success = Append(&linkedList, &node1); + success = Append(&linkedList, &node2); + success = Append(&linkedList, &node3); + success = Append(&linkedList, &node4); + success = Append(&linkedList, &node5); + + RemoveFirst(&linkedList); + + ListNode* travel = linkedList._head; + for (auto i = 2; i <= 5; i++) + { + Assert::AreEqual(i, travel->_data); + travel = travel->_next; + + } + + } + + TEST_METHOD(RemoveFirstNodeWithOneNode_LinkedList_Success) + { + struct SinglyLinkedList linkedList = {}; + + ListNode node1 = { 1, nullptr }; + + //Act + bool success = Append(&linkedList, &node1); + + RemoveFirst(&linkedList); + + Assert::IsNull(linkedList._head); + } + + //RemoveLast + TEST_METHOD(RemoveLastNode_LinkedList_Success) + { + struct SinglyLinkedList linkedList = {}; + + ListNode node1 = { 1, nullptr }; + ListNode node2 = { 2, nullptr }; + ListNode node3 = { 3, nullptr }; + ListNode node4 = { 4, nullptr }; + ListNode node5 = { 5, nullptr }; + + //Act + bool success = Append(&linkedList, &node1); + success = Append(&linkedList, &node2); + success = Append(&linkedList, &node3); + success = Append(&linkedList, &node4); + success = Append(&linkedList, &node5); + + RemoveLast(&linkedList); + + ListNode* travel = linkedList._head; + for (auto i = 1; i <= 4; i++) + { + Assert::AreEqual(i, travel->_data); + travel = travel->_next; + + } + + } + + TEST_METHOD(RemoveLastNodeWithOneNode_LinkedList_Success) + { + struct SinglyLinkedList linkedList = {}; + + ListNode node1 = { 1, nullptr }; + + //Act + bool success = Append(&linkedList, &node1); + + RemoveLast(&linkedList); + + Assert::IsNull(linkedList._head); + } + + //InsertAfter + TEST_METHOD(Single_InserterAfter_LinkedList_Success) + { + //Arrange + struct SinglyLinkedList newList = {}; + //Append Nodes + ListNode node1 = { 1, nullptr }; + ListNode node2 = { 2, nullptr }; + ListNode node4 = { 4, nullptr }; + ListNode node5 = { 5, nullptr }; + + bool success = Append(&newList, &node1); + success = Append(&newList, &node2); + success = Append(&newList, &node4); + success = Append(&newList, &node5); + + //Act + //Insert After a node + ListNode node3 = { 3, nullptr }; + InsertAfter(&newList, 2, &node3); + + //Assert + //Assert that list is correct, one node at a time + + ListNode* travel = newList._head; + for (auto i = 1; i <= 5; i++) + { + Assert::AreEqual(i, travel->_data); + travel = travel->_next; + + } + } + + TEST_METHOD(Single_InserterAfterEnd_LinkedList_Success) + { + //Arrange + struct SinglyLinkedList newList = {}; + //Append Nodes + ListNode node1 = { 1, nullptr }; + ListNode node2 = { 2, nullptr }; + ListNode node3 = { 3, nullptr }; + ListNode node4 = { 4, nullptr }; + + bool success = Append(&newList, &node1); + success = Append(&newList, &node2); + success = Append(&newList, &node3); + success = Append(&newList, &node4); + + //Act + //Insert After a node + ListNode node5 = { 5, nullptr }; + InsertAfter(&newList, 4, &node5); + + //Assert + //Assert that list is correct, one node at a time + + ListNode* travel = newList._head; + for (auto i = 1; i <= 5; i++) + { + Assert::AreEqual(i, travel->_data); + travel = travel->_next; + + } + } + + //InsertBefore + TEST_METHOD(Single_InserterBefore_LinkedList_Success) + { + //Arrange + struct SinglyLinkedList newList = {}; + //Append Nodes + ListNode node1 = { 1, nullptr }; + ListNode node2 = { 2, nullptr }; + ListNode node4 = { 4, nullptr }; + ListNode node5 = { 5, nullptr }; + + bool success = Append(&newList, &node1); + success = Append(&newList, &node2); + success = Append(&newList, &node4); + success = Append(&newList, &node5); + + //Act + //Insert After a node + ListNode node3 = { 3, nullptr }; + InsertBefore(&newList, 4, &node3); + + //Assert + //Assert that list is correct, one node at a time + + ListNode* travel = newList._head; + for (auto i = 1; i <= 5; i++) + { + Assert::AreEqual(i, travel->_data); + travel = travel->_next; + + } + } + + TEST_METHOD(Single_InserterBeforeHead_LinkedList_Success) + { + //Arrange + struct SinglyLinkedList newList = {}; + //Append Nodes + ListNode node2 = { 2, nullptr }; + ListNode node3 = { 3, nullptr }; + ListNode node4 = { 4, nullptr }; + ListNode node5 = { 5, nullptr }; + + bool success = Append(&newList, &node2); + success = Append(&newList, &node3); + success = Append(&newList, &node4); + success = Append(&newList, &node5); + + //Act + //Insert After a node + ListNode node1 = { 1, nullptr }; + InsertBefore(&newList, 2, &node1); + + //Assert + //Assert that list is correct, one node at a time + + ListNode* travel = newList._head; + for (auto i = 1; i <= 5; i++) + { + Assert::AreEqual(i, travel->_data); + travel = travel->_next; + + } + } + + //Clear + TEST_METHOD(OneAppend_Clear_LinkedList_Success) + { + //Arrange + struct SinglyLinkedList linkedList = {}; + ListNode node1 = { 1, nullptr }; + bool success = Append(&linkedList, &node1); + + //Act + //Clearing the list + Clear(&linkedList); + + //Assert + Assert::AreEqual(0ull, linkedList._size); + Assert::IsNull(linkedList._head); + } + + TEST_METHOD(MultipleAppend_Clear_LinkedList_Success) + { + //Arrange + struct SinglyLinkedList linkedList = {}; + + ListNode node1 = { 1, nullptr }; + ListNode node2 = { 2, nullptr }; + ListNode node3 = { 3, nullptr }; + ListNode node4 = { 4, nullptr }; + ListNode node5 = { 5, nullptr }; + + bool success = Append(&linkedList, &node1); + success = Append(&linkedList, &node2); + success = Append(&linkedList, &node3); + success = Append(&linkedList, &node4); + success = Append(&linkedList, &node5); + + //Act + //Clearing the list + Clear(&linkedList); + + //Assert + Assert::AreEqual(0ull, linkedList._size); + Assert::IsNull(linkedList._head); + + Assert::IsNull(node1._next); + Assert::IsNull(node2._next); + Assert::IsNull(node3._next); + Assert::IsNull(node4._next); + Assert::IsNull(node5._next); + } + + //Extract + TEST_METHOD(ExtractFirst_LinkedList_Success) + { + //Arrange + struct SinglyLinkedList newList = {}; + //Append Nodes + ListNode node1 = { 1, nullptr }; + ListNode node2 = { 2, nullptr }; + ListNode node3 = { 3, nullptr }; + ListNode node4 = { 4, nullptr }; + ListNode node5 = { 5, nullptr }; + + ListNode nodeArray[] = { node1, node2, node3, node4, node5 }; + + for (auto& node : nodeArray) + { + Assert::IsTrue(Append(&newList, &node)); + } + + ListNode* temp = Extract(&newList, node1._data); + + /*size_t nodeAddress = reinterpret_cast<size_t>(&node1); + size_t tempAddress = reinterpret_cast<size_t>(temp); + + Assert::AreEqual(nodeAddress, tempAddress);*/ + + Assert::AreEqual(4ull, newList._size); + + delete temp; + } + + TEST_METHOD(ExtractLast_LinkedList_Success) + { + //Arrange + struct SinglyLinkedList newList = {}; + //Append Nodes + ListNode node1 = { 1, nullptr }; + ListNode node2 = { 2, nullptr }; + ListNode node3 = { 3, nullptr }; + ListNode node4 = { 4, nullptr }; + ListNode node5 = { 5, nullptr }; + + ListNode nodeArray[] = { node1, node2, node3, node4, node5 }; + + for (auto& node : nodeArray) + { + Assert::IsTrue(Append(&newList, &node)); + } + + ListNode* temp = Extract(&newList, node5._data); + + Assert::AreEqual(4ull, newList._size); + + delete temp; + } + + TEST_METHOD(ExtractMiddle_LinkedList_Success) + { + //Arrange + struct SinglyLinkedList newList = {}; + //Append Nodes + ListNode node1 = { 1, nullptr }; + ListNode node2 = { 2, nullptr }; + ListNode node3 = { 3, nullptr }; + ListNode node4 = { 4, nullptr }; + ListNode node5 = { 5, nullptr }; + + ListNode nodeArray[] = { node1, node2, node3, node4, node5 }; + + for (auto& node : nodeArray) + { + Assert::IsTrue(Append(&newList, &node)); + } + + ListNode* temp = Extract(&newList, node3._data); + + Assert::AreEqual(4ull, newList._size); + + delete temp; + } + + //Remove + TEST_METHOD(RemoveNode_LinkedList_Success) + { + struct SinglyLinkedList linkedList = {}; + + ListNode node1 = { 1, nullptr }; + ListNode node2 = { 2, nullptr }; + ListNode node3 = { 3, nullptr }; + ListNode node4 = { 4, nullptr }; + ListNode node5 = { 5, nullptr }; + + //Act + bool success = Append(&linkedList, &node1); + success = Append(&linkedList, &node2); + success = Append(&linkedList, &node3); + success = Append(&linkedList, &node4); + success = Append(&linkedList, &node5); + + Remove(&linkedList, &node3); + + ListNode* travel = linkedList._head; + for (auto i = 1; i <= 5; i++) + { + if (i == 3) + i++; + Assert::AreEqual(i, travel->_data); + travel = travel->_next; + + } + + } + + TEST_METHOD(RemoveNodeWithOneNode_Linked_List_Success) { + struct SinglyLinkedList linkedList = {}; + + ListNode node1 = { 1, nullptr }; + + //Act + bool success = Append(&linkedList, &node1); + + Remove(&linkedList, &node1); + + Assert::IsNull(linkedList._head); + } + + }; +} diff --git a/CST 126/LinkedListUnitTests/LinkedListUnitTests.vcxproj b/CST 126/LinkedListUnitTests/LinkedListUnitTests.vcxproj new file mode 100644 index 0000000..25b18fa --- /dev/null +++ b/CST 126/LinkedListUnitTests/LinkedListUnitTests.vcxproj @@ -0,0 +1,174 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Debug|x64"> + <Configuration>Debug</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|x64"> + <Configuration>Release</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <VCProjectVersion>17.0</VCProjectVersion> + <ProjectGuid>{764A846B-5FB7-4C7A-8D47-9CC204AEEE15}</ProjectGuid> + <Keyword>Win32Proj</Keyword> + <RootNamespace>LinkedListUnitTests</RootNamespace> + <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion> + <ProjectSubType>NativeUnitTestProject</ProjectSubType> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <UseDebugLibraries>true</UseDebugLibraries> + <PlatformToolset>v143</PlatformToolset> + <CharacterSet>Unicode</CharacterSet> + <UseOfMfc>false</UseOfMfc> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <UseDebugLibraries>false</UseDebugLibraries> + <PlatformToolset>v143</PlatformToolset> + <WholeProgramOptimization>true</WholeProgramOptimization> + <CharacterSet>Unicode</CharacterSet> + <UseOfMfc>false</UseOfMfc> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <UseDebugLibraries>true</UseDebugLibraries> + <PlatformToolset>v143</PlatformToolset> + <CharacterSet>Unicode</CharacterSet> + <UseOfMfc>false</UseOfMfc> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <UseDebugLibraries>false</UseDebugLibraries> + <PlatformToolset>v143</PlatformToolset> + <WholeProgramOptimization>true</WholeProgramOptimization> + <CharacterSet>Unicode</CharacterSet> + <UseOfMfc>false</UseOfMfc> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Label="Shared"> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <LinkIncremental>true</LinkIncremental> + <IncludePath>..\Homework 3;$(IncludePath)</IncludePath> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <LinkIncremental>true</LinkIncremental> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <LinkIncremental>false</LinkIncremental> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <LinkIncremental>false</LinkIncremental> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ClCompile> + <PrecompiledHeader>Use</PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <SDLCheck>true</SDLCheck> + <AdditionalIncludeDirectories>$(VCInstallDir)UnitTest\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <UseFullPaths>true</UseFullPaths> + <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile> + </ClCompile> + <Link> + <SubSystem>Windows</SubSystem> + <AdditionalLibraryDirectories>$(VCInstallDir)UnitTest\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <PrecompiledHeader>Use</PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <SDLCheck>true</SDLCheck> + <AdditionalIncludeDirectories>$(VCInstallDir)UnitTest\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <UseFullPaths>true</UseFullPaths> + <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile> + </ClCompile> + <Link> + <SubSystem>Windows</SubSystem> + <AdditionalLibraryDirectories>$(VCInstallDir)UnitTest\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <PrecompiledHeader>Use</PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <FunctionLevelLinking>true</FunctionLevelLinking> + <IntrinsicFunctions>true</IntrinsicFunctions> + <SDLCheck>true</SDLCheck> + <AdditionalIncludeDirectories>$(VCInstallDir)UnitTest\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <UseFullPaths>true</UseFullPaths> + <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile> + </ClCompile> + <Link> + <SubSystem>Windows</SubSystem> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <OptimizeReferences>true</OptimizeReferences> + <AdditionalLibraryDirectories>$(VCInstallDir)UnitTest\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <ClCompile> + <PrecompiledHeader>Use</PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <FunctionLevelLinking>true</FunctionLevelLinking> + <IntrinsicFunctions>true</IntrinsicFunctions> + <SDLCheck>true</SDLCheck> + <AdditionalIncludeDirectories>$(VCInstallDir)UnitTest\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <UseFullPaths>true</UseFullPaths> + <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile> + </ClCompile> + <Link> + <SubSystem>Windows</SubSystem> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <OptimizeReferences>true</OptimizeReferences> + <AdditionalLibraryDirectories>$(VCInstallDir)UnitTest\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + </Link> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="LinkedListUnitTests.cpp" /> + <ClCompile Include="pch.cpp"> + <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader> + <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader> + <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader> + <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader> + </ClCompile> + </ItemGroup> + <ItemGroup> + <ClInclude Include="pch.h" /> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project>
\ No newline at end of file diff --git a/CST 126/LinkedListUnitTests/LinkedListUnitTests.vcxproj.filters b/CST 126/LinkedListUnitTests/LinkedListUnitTests.vcxproj.filters new file mode 100644 index 0000000..ed7bc9d --- /dev/null +++ b/CST 126/LinkedListUnitTests/LinkedListUnitTests.vcxproj.filters @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup> + <Filter Include="Source Files"> + <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier> + <Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions> + </Filter> + <Filter Include="Header Files"> + <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier> + <Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions> + </Filter> + <Filter Include="Resource Files"> + <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier> + <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions> + </Filter> + </ItemGroup> + <ItemGroup> + <ClCompile Include="LinkedListUnitTests.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="pch.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + </ItemGroup> + <ItemGroup> + <ClInclude Include="pch.h"> + <Filter>Header Files</Filter> + </ClInclude> + </ItemGroup> +</Project>
\ No newline at end of file diff --git a/CST 126/LinkedListUnitTests/pch.cpp b/CST 126/LinkedListUnitTests/pch.cpp new file mode 100644 index 0000000..64b7eef --- /dev/null +++ b/CST 126/LinkedListUnitTests/pch.cpp @@ -0,0 +1,5 @@ +// pch.cpp: source file corresponding to the pre-compiled header + +#include "pch.h" + +// When you are using pre-compiled headers, this source file is necessary for compilation to succeed. diff --git a/CST 126/LinkedListUnitTests/pch.h b/CST 126/LinkedListUnitTests/pch.h new file mode 100644 index 0000000..9d715b0 --- /dev/null +++ b/CST 126/LinkedListUnitTests/pch.h @@ -0,0 +1,12 @@ +// pch.h: This is a precompiled header file. +// Files listed below are compiled only once, improving build performance for future builds. +// This also affects IntelliSense performance, including code completion and many code browsing features. +// However, files listed here are ALL re-compiled if any one of them is updated between builds. +// Do not add files here that you will be updating frequently as this negates the performance advantage. + +#ifndef PCH_H +#define PCH_H + +// add headers that you want to pre-compile here + +#endif //PCH_H |