Skip to content

Commit

Permalink
Merge branch 'main' into AVLtree
Browse files Browse the repository at this point in the history
  • Loading branch information
artemiipatov committed Dec 18, 2021
2 parents bbe5b69 + aed58ff commit b97b394
Show file tree
Hide file tree
Showing 135 changed files with 5,128 additions and 169 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: MSBuild

on: [push]

env:
SOLUTION_FILE_PATH: ./homework4/Hw4Task3
BUILD_CONFIGURATION: Release

jobs:
build:
runs-on: windows-2022

steps:
- uses: actions/checkout@v2

- name: Add MSBuild to PATH
uses: microsoft/[email protected]

- name: Build
working-directory: ${{env.GITHUB_WORKSPACE}}
run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_FILE_PATH}}
16 changes: 16 additions & 0 deletions build.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
for /D %%s in (.\*) do (
cd %%s
for /D %%s in (.\*) do (
cd %%s
MSBuild
if exist x64 (
cd x64/Debug
for /R %%I in (*.exe) do %%I 1
if not errorlevel 0 (
echo program did not pass tests
) else (
echo program passed tests)
cd ../..
)
cd ..)
cd ..)
9 changes: 7 additions & 2 deletions homework3/Hw3Task1/Hw3Task1/Hw3Task1.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,18 @@ bool testQSortCorrectExecution()
return true;
}

int main()
int main(int argc, char argv[])
{
if (!testQSortCorrectExecution())
{
printf("Test failed");
printf("Tests failed");
return -1;
}
if (argc > 1)
{
printf("Tests passed");
return 0;
}
int length = 0;

// Memory allocation
Expand Down
10 changes: 5 additions & 5 deletions homework3/Hw3Task1/Hw3Task1/Hw3Task1.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -29,26 +29,26 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
Expand Down Expand Up @@ -113,7 +113,7 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<SDLCheck>false</SDLCheck>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
Expand Down
7 changes: 5 additions & 2 deletions homework3/Hw3Task2/Hw3Task2/Hw3Task2.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,16 +161,19 @@ bool testBinSearchCorrectExecution()
return true;
}

int main()
int main(int argc, char* argv[])
{
// Test
if (!testQSortCorrectExecution() && !testBinSearchCorrectExecution())
{
printf("Test failed");
return -1;
}
if (argc > 1)
{
return 0;
}
int length = 0;

// Memory allocation
printf("Length or main array: ");
scanf("%d", &length);
Expand Down
10 changes: 5 additions & 5 deletions homework3/Hw3Task2/Hw3Task2/Hw3Task2.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -34,26 +34,26 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
Expand Down Expand Up @@ -118,7 +118,7 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<SDLCheck>false</SDLCheck>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
Expand Down
7 changes: 5 additions & 2 deletions homework3/Hw3Task3/Hw3Task3/Hw3Task3.c
Original file line number Diff line number Diff line change
Expand Up @@ -159,14 +159,17 @@ bool testQSortCorrectExecution()
return true;
}

int main()
int main(int argv, char* argc[])
{
if (!testQSortCorrectExecution() || !testMostFrequentElement())
{
printf("Test failed");
return -1;
}

if (argv > 1)
{
return 0;
}
int length = 0;
printf("Length of main array: ");
scanf("%d", &length);
Expand Down
10 changes: 5 additions & 5 deletions homework3/Hw3Task3/Hw3Task3/Hw3Task3.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -34,26 +34,26 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
Expand Down Expand Up @@ -118,7 +118,7 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<SDLCheck>false</SDLCheck>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
Expand Down
8 changes: 6 additions & 2 deletions homework4/Hw4Task1/Hw4Task1/Hw4Task1.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,8 @@ bool testCorrectExecutionOfAllFunctions()
return binaryToDecimal(binarySum3) == -19432;
}

int main()
// test comments
int main(int argc, int argv[])
{
// Russian symbols
setlocale(0, "Russian");
Expand All @@ -145,7 +146,10 @@ int main()
printf("Ïðîãðàììà íå ïðîøëà òåñòû.");
return -1;
}

if (argc > 1)
{
return 0;
}
// Two decimal numbers
printf("Ââåäèòå ÷èñëà:\n");
int firstDecimalNumber = 0;
Expand Down
2 changes: 1 addition & 1 deletion homework4/Hw4Task1/Hw4Task1/Hw4Task1.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<SDLCheck>false</SDLCheck>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
Expand Down
31 changes: 31 additions & 0 deletions homework4/Hw4Task2/Hw4Task2.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.31903.59
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Hw4Task2", "Hw4Task2\Hw4Task2.vcxproj", "{9B179246-84F7-4728-8325-F1C074DB9F5E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{9B179246-84F7-4728-8325-F1C074DB9F5E}.Debug|x64.ActiveCfg = Debug|x64
{9B179246-84F7-4728-8325-F1C074DB9F5E}.Debug|x64.Build.0 = Debug|x64
{9B179246-84F7-4728-8325-F1C074DB9F5E}.Debug|x86.ActiveCfg = Debug|Win32
{9B179246-84F7-4728-8325-F1C074DB9F5E}.Debug|x86.Build.0 = Debug|Win32
{9B179246-84F7-4728-8325-F1C074DB9F5E}.Release|x64.ActiveCfg = Release|x64
{9B179246-84F7-4728-8325-F1C074DB9F5E}.Release|x64.Build.0 = Release|x64
{9B179246-84F7-4728-8325-F1C074DB9F5E}.Release|x86.ActiveCfg = Release|Win32
{9B179246-84F7-4728-8325-F1C074DB9F5E}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {64F0D4E7-96A8-44B0-B9FA-F986049F91BE}
EndGlobalSection
EndGlobal
32 changes: 15 additions & 17 deletions homework4/Hw4Task2/Hw4Task2/Hw4Task2.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,34 +21,34 @@
<PropertyGroup Label="Globals">
<VCProjectVersion>16.0</VCProjectVersion>
<Keyword>Win32Proj</Keyword>
<ProjectGuid>{d2f9e1b7-746c-4295-afae-f65162b7f1fa}</ProjectGuid>
<ProjectGuid>{9b179246-84f7-4728-8325-f1c074db9f5e}</ProjectGuid>
<RootNamespace>Hw4Task2</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
Expand Down Expand Up @@ -139,22 +139,20 @@
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="main.c">
<SDLCheck Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</SDLCheck>
</ClCompile>
<ClCompile Include="mostFrequentElementSearch.c" />
<ClCompile Include="sort.c" />
<ClCompile Include="testMostFrequentElement.c" />
<ClCompile Include="testQuickSort.c" />
<ClCompile Include="..\..\..\..\..\..\Desktop\Back up homeworks\27112021\Hw4Task2\Hw4Task2\main.c" />
<ClCompile Include="..\..\..\..\..\..\Desktop\Back up homeworks\27112021\Hw4Task2\Hw4Task2\mostFrequentElementSearch.c" />
<ClCompile Include="..\..\..\..\..\..\Desktop\Back up homeworks\27112021\Hw4Task2\Hw4Task2\sort.c" />
<ClCompile Include="..\..\..\..\..\..\Desktop\Back up homeworks\27112021\Hw4Task2\Hw4Task2\testMostFrequentElement.c" />
<ClCompile Include="..\..\..\..\..\..\Desktop\Back up homeworks\27112021\Hw4Task2\Hw4Task2\testQuickSort.c" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="mostFrequentElementSearch.h" />
<ClInclude Include="sort.h" />
<ClInclude Include="testMostFrequentElement.h" />
<ClInclude Include="testQuickSort.h" />
<Text Include="..\..\..\..\..\..\Desktop\Back up homeworks\27112021\Hw4Task2\Hw4Task2\input.txt" />
</ItemGroup>
<ItemGroup>
<Text Include="input.txt" />
<ClInclude Include="..\..\..\..\..\..\Desktop\Back up homeworks\27112021\Hw4Task2\Hw4Task2\mostFrequentElementSearch.h" />
<ClInclude Include="..\..\..\..\..\..\Desktop\Back up homeworks\27112021\Hw4Task2\Hw4Task2\sort.h" />
<ClInclude Include="..\..\..\..\..\..\Desktop\Back up homeworks\27112021\Hw4Task2\Hw4Task2\testMostFrequentElement.h" />
<ClInclude Include="..\..\..\..\..\..\Desktop\Back up homeworks\27112021\Hw4Task2\Hw4Task2\testQuickSort.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
Expand Down
10 changes: 5 additions & 5 deletions homework4/Hw4Task3/Hw4Task3/Hw4Task3.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -42,26 +42,26 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
Expand Down Expand Up @@ -126,7 +126,7 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<SDLCheck>false</SDLCheck>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
Expand Down
Loading

0 comments on commit b97b394

Please sign in to comment.