Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
sdottaka committed Dec 21, 2024
1 parent 1155de3 commit d947129
Show file tree
Hide file tree
Showing 3 changed files with 80 additions and 2 deletions.
26 changes: 24 additions & 2 deletions Testing/GoogleTest/ProjectFile/ProjectFile_test_PathsAndFilter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,30 @@ TEST_F(PathAndFilterTest, GetTableProperties)
*/
TEST_F(PathAndFilterTest, GetDiffOptions)
{
bool bIgnoreMissingTrailingEol = m_pProjectFileItem->HasIgnoreMissingTrailingEol();
ASSERT_TRUE(bIgnoreMissingTrailingEol == true);
ASSERT_EQ(true, m_pProjectFileItem->HasIgnoreMissingTrailingEol());
ASSERT_EQ(true, m_pProjectFileItem->HasFilterCommentsLines());
ASSERT_EQ(true, m_pProjectFileItem->HasIgnoreCodepage());
ASSERT_EQ(true, m_pProjectFileItem->HasIgnoreNumbers());
ASSERT_EQ(true, m_pProjectFileItem->HasIgnoreEol());
ASSERT_EQ(true, m_pProjectFileItem->HasIgnoreCase());
ASSERT_EQ(true, m_pProjectFileItem->HasIgnoreBlankLines());
ASSERT_EQ(true, m_pProjectFileItem->GetIgnoreMissingTrailingEol());
ASSERT_EQ(true, m_pProjectFileItem->GetFilterCommentsLines());
ASSERT_EQ(true, m_pProjectFileItem->GetIgnoreCodepage());
ASSERT_EQ(true, m_pProjectFileItem->GetIgnoreNumbers());
ASSERT_EQ(true, m_pProjectFileItem->GetIgnoreEol());
ASSERT_EQ(true, m_pProjectFileItem->GetIgnoreCase());
ASSERT_EQ(true, m_pProjectFileItem->GetIgnoreBlankLines());
}

/**
* @brief Read hidden items
*/
TEST_F(PathAndFilterTest, GetHiddenItems)
{
ASSERT_EQ(true, m_pProjectFileItem->HasHiddenItems());
ASSERT_EQ(2, m_pProjectFileItem->GetHiddenItems().size());
ASSERT_EQ(_T("file1.txt"), m_pProjectFileItem->GetHiddenItems()[0]);
ASSERT_EQ(_T("file2.txt"), m_pProjectFileItem->GetHiddenItems()[1]);
}
}
13 changes: 13 additions & 0 deletions Testing/GoogleTest/UnitTests/UnitTests.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -888,6 +888,19 @@
<ClInclude Include="..\..\..\Src\xdiff_gnudiff_compat.h" />
<ClInclude Include="pch.h" />
</ItemGroup>
<ItemGroup>
<None Include="..\TestData\LeftAndRight.WinMerge" />
<None Include="..\TestData\LeftAndRightNonRecursive.WinMerge" />
<None Include="..\TestData\LeftAndRightRecursive.WinMerge" />
<None Include="..\TestData\PathsAndFilter.WinMerge" />
<None Include="..\TestData\SimpleLeft.WinMerge" />
<None Include="..\TestData\SimpleRight.WinMerge" />
</ItemGroup>
<ItemGroup>
<Text Include="..\TestData\DirWatcher\Subdir1\test.txt" />
<Text Include="..\TestData\DirWatcher\test.txt" />
<Text Include="..\TestData\DirWatcher\test2.txt" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
Expand Down
43 changes: 43 additions & 0 deletions Testing/GoogleTest/UnitTests/UnitTests.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,18 @@
<Filter Include="Tests">
<UniqueIdentifier>{4b87ff85-2ba4-475b-823e-af42e45a3098}</UniqueIdentifier>
</Filter>
<Filter Include="TestData">
<UniqueIdentifier>{26fc7ec7-3745-4a0e-9152-b470022385cd}</UniqueIdentifier>
</Filter>
<Filter Include="TestData\DirWatcher">
<UniqueIdentifier>{185652df-51ae-4061-8100-d261f79b6116}</UniqueIdentifier>
</Filter>
<Filter Include="TestData\DirWatcher\Subdir2">
<UniqueIdentifier>{c49154d0-df48-4a75-965a-bd0f362bfa1a}</UniqueIdentifier>
</Filter>
<Filter Include="TestData\DirWatcher\Subdir1">
<UniqueIdentifier>{3068dbe3-428a-4a24-aedf-8eed46f308c4}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\Src\charsets.c">
Expand Down Expand Up @@ -453,4 +465,35 @@
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="..\TestData\LeftAndRight.WinMerge">
<Filter>TestData</Filter>
</None>
<None Include="..\TestData\LeftAndRightNonRecursive.WinMerge">
<Filter>TestData</Filter>
</None>
<None Include="..\TestData\LeftAndRightRecursive.WinMerge">
<Filter>TestData</Filter>
</None>
<None Include="..\TestData\PathsAndFilter.WinMerge">
<Filter>TestData</Filter>
</None>
<None Include="..\TestData\SimpleLeft.WinMerge">
<Filter>TestData</Filter>
</None>
<None Include="..\TestData\SimpleRight.WinMerge">
<Filter>TestData</Filter>
</None>
</ItemGroup>
<ItemGroup>
<Text Include="..\TestData\DirWatcher\test.txt">
<Filter>TestData\DirWatcher</Filter>
</Text>
<Text Include="..\TestData\DirWatcher\test2.txt">
<Filter>TestData\DirWatcher</Filter>
</Text>
<Text Include="..\TestData\DirWatcher\Subdir1\test.txt">
<Filter>TestData\DirWatcher\Subdir1</Filter>
</Text>
</ItemGroup>
</Project>

0 comments on commit d947129

Please sign in to comment.