From f58da7710e0fa113cc8ccc0d50db07527f9cc879 Mon Sep 17 00:00:00 2001 From: imaras Date: Mon, 12 Nov 2018 21:47:01 +0100 Subject: [PATCH 1/3] =?UTF-8?q?day1=20exercise=2001=20-=20kori=C5=A1tenje?= =?UTF-8?q?=20stati=C4=8Dke=20biblioteke=20(.lib)=20i=20dinami=C4=8Dke=20b?= =?UTF-8?q?iblioteke=20(.dll,=20na=20dva=20na=C4=8Dina)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- exercise/01/app/app.cpp | Bin 0 -> 1426 bytes exercise/01/app/app.vcxproj | 212 ++++++++++++++++++++++++++++ exercise/01/app/app.vcxproj.filters | 30 ++++ exercise/01/app/pch.cpp | Bin 0 -> 430 bytes exercise/01/app/pch.h | Bin 0 -> 1236 bytes exercise/01/e01.sln | 26 ++-- 6 files changed, 255 insertions(+), 13 deletions(-) create mode 100644 exercise/01/app/app.cpp create mode 100644 exercise/01/app/app.vcxproj create mode 100644 exercise/01/app/app.vcxproj.filters create mode 100644 exercise/01/app/pch.cpp create mode 100644 exercise/01/app/pch.h diff --git a/exercise/01/app/app.cpp b/exercise/01/app/app.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a2f2e2d9dfd57c416c7fc64221e89167d66648f0 GIT binary patch literal 1426 zcmb`HTT8=05QWcc1ph;M9sep-1%Sv8xZt zVwL<-)Onq9Ee>?3W1Z_l+pIgL19l-`?kMM3p-P6 zeMT9EW#Uvyv@{%Cl|2nPj3Ow<|C_;I{aB1PUC$XbAA>XIX%C(;W3*=DH6F5Y-sY_S pfA7}yLcKF?w>oQwia8`9^)k1T>4VAlQ{J`aCMZ9_vz}DP`5SLD;12)* literal 0 HcmV?d00001 diff --git a/exercise/01/app/app.vcxproj b/exercise/01/app/app.vcxproj new file mode 100644 index 0000000..a1ada28 --- /dev/null +++ b/exercise/01/app/app.vcxproj @@ -0,0 +1,212 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 15.0 + {F62D0000-7A72-422A-9A90-304646322E70} + Win32Proj + app + 10.0.17134.0 + + + + Application + true + v141 + Unicode + + + Application + false + v141 + true + Unicode + + + Application + true + v141 + Unicode + + + Application + false + v141 + true + Unicode + + + + + + + + + + + + + + + + + + + + + true + + + true + + + false + + + false + + + + Use + Level3 + Disabled + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + pch.h + ..\dll2\public.h;..\lib\public.h;%(AdditionalIncludeDirectories) + + + Console + true + ../dll2/$(Platform)/$(Configuration);../lib/$(Platform)/$(Configuration);%(AdditionalLibraryDirectories) + static_library.lib;dynamic_library_with_implib.lib;%(AdditionalDependencies) + + + copy /Y "..\dll2\$(Platform)\$(Configuration)\dynamic_library_with_implib.dll" "../$(Platform)/$(Configuration)/dynamic_library_with_implib.dll" +copy /Y "..\dll1\$(Platform)\$(Configuration)\dynamic_library.dll" "../$(Platform)/$(Configuration)/dynamic_library.dll" + + + + + + + + + Use + Level3 + Disabled + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + pch.h + ..\dll2\public.h;..\lib\public.h;%(AdditionalIncludeDirectories) + + + Console + true + static_library.lib;dynamic_library_with_implib.lib;%(AdditionalDependencies) + ../dll2/$(Platform)/$(Configuration);../lib/$(Platform)/$(Configuration);%(AdditionalLibraryDirectories) + + + copy /Y "..\dll2\$(Platform)\$(Configuration)\dynamic_library_with_implib.dll" "../$(Configuration)/dynamic_library_with_implib.dll" +copy /Y "..\dll1\$(Platform)\$(Configuration)\dynamic_library.dll" "../$(Configuration)/dynamic_library.dll" + + + + + + + + + Use + Level3 + MaxSpeed + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + pch.h + ..\dll2\public.h;..\lib\public.h;%(AdditionalIncludeDirectories) + + + Console + true + true + true + ../dll2/$(Platform)/$(Configuration);../lib/$(Platform)/$(Configuration);%(AdditionalLibraryDirectories) + static_library.lib;dynamic_library_with_implib.lib;%(AdditionalDependencies) + + + copy /Y "..\dll2\$(Platform)\$(Configuration)\dynamic_library_with_implib.dll" "../$(Configuration)/dynamic_library_with_implib.dll" +copy /Y "..\dll1\$(Platform)\$(Configuration)\dynamic_library.dll" "../$(Configuration)/dynamic_library.dll" + + + + + + + + + Use + Level3 + MaxSpeed + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + pch.h + ..\dll2\public.h;..\lib\public.h;%(AdditionalIncludeDirectories) + + + Console + true + true + true + ../dll2/$(Platform)/$(Configuration);../lib/$(Platform)/$(Configuration);%(AdditionalLibraryDirectories) + static_library.lib;dynamic_library_with_implib.lib;%(AdditionalDependencies) + + + copy /Y "..\dll2\$(Platform)\$(Configuration)\dynamic_library_with_implib.dll" "../$(Platform)/$(Configuration)/dynamic_library_with_implib.dll" +copy /Y "..\dll1\$(Platform)\$(Configuration)\dynamic_library.dll" "../$(Platform)/$(Configuration)/dynamic_library.dll" + + + + + + + + + + Create + Create + Create + Create + + + + + + + + + \ No newline at end of file diff --git a/exercise/01/app/app.vcxproj.filters b/exercise/01/app/app.vcxproj.filters new file mode 100644 index 0000000..95c9b51 --- /dev/null +++ b/exercise/01/app/app.vcxproj.filters @@ -0,0 +1,30 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + Source Files + + + + + Header Files + + + \ No newline at end of file diff --git a/exercise/01/app/pch.cpp b/exercise/01/app/pch.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a38f8a37da858b0e7a4a577210e923c883ac97f3 GIT binary patch literal 430 zcma)(OAdlS5JYQj;vFWsRoUwaJO;ubLXfO} ziM!*RK?b#&)PqF4LX~Q_GVq=g$>^{f<-{7@$r|ykmqm|MwtC_%l{t|TJS9Jpalvn} ztpC7C!Dg_+`-h+El+KlNtsDc|GOvyF+iK(A-j!r1ot!0T2mdlziM{46Ghg8k=#H+V zM?tLvNCnoo3Y&aHb%nm~4lL&e!^roanA zJS&;$bBt`6tTa!7Oip_838YL>ydtd?BY|bDkpL*%3f|!47R<^0X_IdNOs`!rePhJ1PqaE!pHo1c6SeGmehj;D{|krnWtD}= zZ6exiIb?5owxNdF!bC4?HP$EKQWY7Xirp8GY7aRqov07V5lHkDZNB zORjO#J)Q4i<#*tO3Jb=V7%5KJg;ew2$%DM$ zwo|i{9eIpo|1`wsK;zeMoxDcILTAo8z5x5*Jojg^gsQWRulZBCMEN=W1J%)g07Tu& A1ONa4 literal 0 HcmV?d00001 diff --git a/exercise/01/e01.sln b/exercise/01/e01.sln index fb6ce37..a6aa13e 100644 --- a/exercise/01/e01.sln +++ b/exercise/01/e01.sln @@ -5,17 +5,17 @@ VisualStudioVersion = 15.0.28010.2036 MinimumVisualStudioVersion = 10.0.40219.1 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "static_library", "lib\static_library.vcxproj", "{990D865F-0DF2-40ED-8622-8DD0DB4A2128}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "app", "app\app.vcxproj", "{843D77A9-6E04-4515-91D5-A010A5CDF8E0}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dynamic_library", "dll1\dynamic_library.vcxproj", "{92DBD108-3D52-419D-BC33-217327A4AD9D}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dynamic_library_with_implib", "dll2\dynamic_library_with_implib.vcxproj", "{4EA09877-C87B-489E-9F80-A921D8E66E46}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "app", "app\app.vcxproj", "{F62D0000-7A72-422A-9A90-304646322E70}" ProjectSection(ProjectDependencies) = postProject {92DBD108-3D52-419D-BC33-217327A4AD9D} = {92DBD108-3D52-419D-BC33-217327A4AD9D} {990D865F-0DF2-40ED-8622-8DD0DB4A2128} = {990D865F-0DF2-40ED-8622-8DD0DB4A2128} {4EA09877-C87B-489E-9F80-A921D8E66E46} = {4EA09877-C87B-489E-9F80-A921D8E66E46} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dynamic_library", "dll1\dynamic_library.vcxproj", "{92DBD108-3D52-419D-BC33-217327A4AD9D}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dynamic_library_with_implib", "dll2\dynamic_library_with_implib.vcxproj", "{4EA09877-C87B-489E-9F80-A921D8E66E46}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|x64 = Debug|x64 @@ -32,14 +32,6 @@ Global {990D865F-0DF2-40ED-8622-8DD0DB4A2128}.Release|x64.Build.0 = Release|x64 {990D865F-0DF2-40ED-8622-8DD0DB4A2128}.Release|x86.ActiveCfg = Release|Win32 {990D865F-0DF2-40ED-8622-8DD0DB4A2128}.Release|x86.Build.0 = Release|Win32 - {843D77A9-6E04-4515-91D5-A010A5CDF8E0}.Debug|x64.ActiveCfg = Debug|x64 - {843D77A9-6E04-4515-91D5-A010A5CDF8E0}.Debug|x64.Build.0 = Debug|x64 - {843D77A9-6E04-4515-91D5-A010A5CDF8E0}.Debug|x86.ActiveCfg = Debug|Win32 - {843D77A9-6E04-4515-91D5-A010A5CDF8E0}.Debug|x86.Build.0 = Debug|Win32 - {843D77A9-6E04-4515-91D5-A010A5CDF8E0}.Release|x64.ActiveCfg = Release|x64 - {843D77A9-6E04-4515-91D5-A010A5CDF8E0}.Release|x64.Build.0 = Release|x64 - {843D77A9-6E04-4515-91D5-A010A5CDF8E0}.Release|x86.ActiveCfg = Release|Win32 - {843D77A9-6E04-4515-91D5-A010A5CDF8E0}.Release|x86.Build.0 = Release|Win32 {92DBD108-3D52-419D-BC33-217327A4AD9D}.Debug|x64.ActiveCfg = Debug|x64 {92DBD108-3D52-419D-BC33-217327A4AD9D}.Debug|x64.Build.0 = Debug|x64 {92DBD108-3D52-419D-BC33-217327A4AD9D}.Debug|x86.ActiveCfg = Debug|Win32 @@ -56,6 +48,14 @@ Global {4EA09877-C87B-489E-9F80-A921D8E66E46}.Release|x64.Build.0 = Release|x64 {4EA09877-C87B-489E-9F80-A921D8E66E46}.Release|x86.ActiveCfg = Release|Win32 {4EA09877-C87B-489E-9F80-A921D8E66E46}.Release|x86.Build.0 = Release|Win32 + {F62D0000-7A72-422A-9A90-304646322E70}.Debug|x64.ActiveCfg = Debug|x64 + {F62D0000-7A72-422A-9A90-304646322E70}.Debug|x64.Build.0 = Debug|x64 + {F62D0000-7A72-422A-9A90-304646322E70}.Debug|x86.ActiveCfg = Debug|Win32 + {F62D0000-7A72-422A-9A90-304646322E70}.Debug|x86.Build.0 = Debug|Win32 + {F62D0000-7A72-422A-9A90-304646322E70}.Release|x64.ActiveCfg = Release|x64 + {F62D0000-7A72-422A-9A90-304646322E70}.Release|x64.Build.0 = Release|x64 + {F62D0000-7A72-422A-9A90-304646322E70}.Release|x86.ActiveCfg = Release|Win32 + {F62D0000-7A72-422A-9A90-304646322E70}.Release|x86.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE From 154de8cb1e1691a491a734c2bc6dde0759b75a20 Mon Sep 17 00:00:00 2001 From: imaras Date: Tue, 13 Nov 2018 11:18:55 +0100 Subject: [PATCH 2/3] day1 - exercise 02 - Unit testovi za jednostavne funkcije --- exercise/02/code.cpp | 16 ++++++++++++++++ exercise/02/code.h | 3 +++ exercise/02/test1.cpp | 6 +++--- 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/exercise/02/code.cpp b/exercise/02/code.cpp index 85e778c..db83971 100644 --- a/exercise/02/code.cpp +++ b/exercise/02/code.cpp @@ -1,2 +1,18 @@ #include "stdafx.h" #include "code.h" + +void f1(int& a, int& b) +{ + int temp = a; + a = b; + b = temp; +} + +void f2(int* begin, int* end) +{ + while (end != begin) + { + *begin = (*begin) + 1; + begin++; + } +} diff --git a/exercise/02/code.h b/exercise/02/code.h index e69de29..650a76b 100644 --- a/exercise/02/code.h +++ b/exercise/02/code.h @@ -0,0 +1,3 @@ + +void f1(int& a, int& b); +void f2(int* begin, int* end); \ No newline at end of file diff --git a/exercise/02/test1.cpp b/exercise/02/test1.cpp index 33dfab7..29b52ae 100644 --- a/exercise/02/test1.cpp +++ b/exercise/02/test1.cpp @@ -14,14 +14,14 @@ namespace simple_test TEST_METHOD(f1_changes_values) { int a=1, b=2; - //f1(a, b); + f1(a, b); Assert::AreEqual(2, a); Assert::AreEqual(1, b); } TEST_METHOD(f2_increases_all_values_by_one) { int arr[] = { 1, 2, 3 }; - //f2(arr, arr+3); + f2(arr, arr+3); Assert::AreEqual(2, arr[0]); Assert::AreEqual(3, arr[1]); Assert::AreEqual(4, arr[2]); @@ -29,7 +29,7 @@ namespace simple_test TEST_METHOD(f2_works_for_different_number_of_values) { int arr[] = { 2, 4, 6, 8, 10 }; - //f2(arr, arr+5); + f2(arr, arr+5); Assert::AreEqual(3, arr[0]); Assert::AreEqual(5, arr[1]); Assert::AreEqual(7, arr[2]); From 03508806785ffe6219b46c3d057deabcdc90b01b Mon Sep 17 00:00:00 2001 From: imaras Date: Tue, 13 Nov 2018 13:58:23 +0100 Subject: [PATCH 3/3] Add simple_test.sln solution --- exercise/02/simple_test.sln | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 exercise/02/simple_test.sln diff --git a/exercise/02/simple_test.sln b/exercise/02/simple_test.sln new file mode 100644 index 0000000..3b829b1 --- /dev/null +++ b/exercise/02/simple_test.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.28010.2050 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "simple_test", "simple_test.vcxproj", "{F2F0B29D-E5BA-47BD-A20C-6373652373DB}" +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 + {F2F0B29D-E5BA-47BD-A20C-6373652373DB}.Debug|x64.ActiveCfg = Debug|x64 + {F2F0B29D-E5BA-47BD-A20C-6373652373DB}.Debug|x64.Build.0 = Debug|x64 + {F2F0B29D-E5BA-47BD-A20C-6373652373DB}.Debug|x86.ActiveCfg = Debug|Win32 + {F2F0B29D-E5BA-47BD-A20C-6373652373DB}.Debug|x86.Build.0 = Debug|Win32 + {F2F0B29D-E5BA-47BD-A20C-6373652373DB}.Release|x64.ActiveCfg = Release|x64 + {F2F0B29D-E5BA-47BD-A20C-6373652373DB}.Release|x64.Build.0 = Release|x64 + {F2F0B29D-E5BA-47BD-A20C-6373652373DB}.Release|x86.ActiveCfg = Release|Win32 + {F2F0B29D-E5BA-47BD-A20C-6373652373DB}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {15B9C49E-ADDA-4471-B5C4-BB652F57C27E} + EndGlobalSection +EndGlobal