Skip to content

Commit 92f9503

Browse files
strange-cornerstrange-corner
strange-corner
authored and
strange-corner
committed
https://github.com/actions/checkout/issues/692
calling a workflow instead of an action Testfile dem Projekt hinzugefügt mit der Eigenschaft: Copy
1 parent 20268e2 commit 92f9503

File tree

5 files changed

+20
-7
lines changed

5 files changed

+20
-7
lines changed

.github/workflows/msbuild.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,12 @@ jobs:
4343
# See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference
4444
run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_FILE_PATH}}
4545

46-
# run unit test
47-
- name: run unit test
48-
uses: microsoft/vstest@v17.8.0
49-
with:
46+
test:
47+
runs-on: windows-latest
48+
# run unit test
49+
name: run unit test
50+
uses: microsoft/vstest@v17.8.0
51+
with:
5052
testAssembly: UnitTest1.dll
5153
searchFolder: x64\Release\
5254
runInParallel: true

UnitTest1/UnitTest1.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ namespace UnitTest1
1010

1111
TEST_METHOD(Method1) {
1212

13+
const unsigned int N_ELEMENTS_IN_TESTFILE{8192};
1314
const unsigned int CACHE_LEN{ 1024 };
1415
FILE *f;
1516
errno_t err = fopen_s(&f, "testfile.bin", "rb");
@@ -27,11 +28,11 @@ namespace UnitTest1
2728
Assert::AreEqual<int>(value + 1, newValue);
2829
value = newValue;
2930
}
30-
Assert::AreEqual<unsigned int>(2048, testee.top_, L"End of file");
31-
Assert::AreEqual<unsigned int>(2048 - CACHE_LEN, testee.bottom_, L"End of file");
31+
Assert::AreEqual<unsigned int>(N_ELEMENTS_IN_TESTFILE, testee.top_, L"End of file");
32+
Assert::AreEqual<unsigned int>(N_ELEMENTS_IN_TESTFILE - CACHE_LEN, testee.bottom_, L"End of file");
3233
ok = testee.getPrev(value);
3334
Assert::IsTrue(ok);
34-
Assert::AreEqual<unsigned int>(2047, value);
35+
Assert::AreEqual<unsigned int>(N_ELEMENTS_IN_TESTFILE - 1, value);
3536
while (ok) {
3637
printf("%d", value);
3738
int newValue;

UnitTest1/UnitTest1.vcxproj

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,11 @@
172172
<ItemGroup>
173173
<ClInclude Include="pch.h" />
174174
</ItemGroup>
175+
<ItemGroup>
176+
<CopyFileToFolders Include="testfile.bin">
177+
<FileType>Document</FileType>
178+
</CopyFileToFolders>
179+
</ItemGroup>
175180
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
176181
<ImportGroup Label="ExtensionTargets">
177182
</ImportGroup>

UnitTest1/UnitTest1.vcxproj.filters

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,9 @@
2727
<Filter>Headerdateien</Filter>
2828
</ClInclude>
2929
</ItemGroup>
30+
<ItemGroup>
31+
<CopyFileToFolders Include="testfile.bin">
32+
<Filter>Ressourcendateien</Filter>
33+
</CopyFileToFolders>
34+
</ItemGroup>
3035
</Project>

UnitTest1/testfile.bin

32 KB
Binary file not shown.

0 commit comments

Comments
 (0)