From 292aa09911d120cf408979cd8d56afe8bb7b758e Mon Sep 17 00:00:00 2001 From: JIU JIALIN <2339061402@qq.com> Date: Fri, 11 Jul 2025 18:16:27 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E6=96=B0=E5=BB=BA=E6=89=93=E5=8D=B0?= =?UTF-8?q?=E5=87=BD=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- JJL.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/JJL.c b/JJL.c index 82865e4..c1c83c0 100644 --- a/JJL.c +++ b/JJL.c @@ -10,6 +10,12 @@ int sub(int a,int b) return a-b; } +void my_printf(int a) +{ + printf("\r\n\r\n%d\r\n\r\n",a); +} + + int main() { printf("hello world!"); From ea407a65ba25106b1474000aef3eff6a97dc2588 Mon Sep 17 00:00:00 2001 From: JIU JIALIN <2339061402@qq.com> Date: Fri, 11 Jul 2025 18:24:12 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E5=88=9B=E5=BB=BA=E4=BA=86=E4=B8=AA?= =?UTF-8?q?=E5=A4=B4=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- JJL.h | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 JJL.h diff --git a/JJL.h b/JJL.h new file mode 100644 index 0000000..cb2ddb4 --- /dev/null +++ b/JJL.h @@ -0,0 +1,7 @@ +#include + +using namespace std; + +void my_printf(int a); + + From ef41d37b41e3a31e4f71cb0149b3d3f028e81596 Mon Sep 17 00:00:00 2001 From: JIU JIALIN <2339061402@qq.com> Date: Fri, 11 Jul 2025 18:51:20 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=BF=BD=E7=95=A5?= =?UTF-8?q?=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index dbe9c82..e6e9a85 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -.vscode/ \ No newline at end of file +patch/ From b58bc8a29f79167efb954fcb6bed84188b18eb09 Mon Sep 17 00:00:00 2001 From: JIU JIALIN <2339061402@qq.com> Date: Fri, 11 Jul 2025 19:07:57 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E5=BF=BD=E7=95=A5Unit=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- UnitTest1.cpp | 57 --------------------------------------------------- readme.txt | 1 + 2 files changed, 1 insertion(+), 57 deletions(-) delete mode 100644 UnitTest1.cpp create mode 100644 readme.txt diff --git a/UnitTest1.cpp b/UnitTest1.cpp deleted file mode 100644 index ea56c80..0000000 --- a/UnitTest1.cpp +++ /dev/null @@ -1,57 +0,0 @@ -#include "pch.h" -#include "CppUnitTest.h" -#include "test.h" -#include -#include -#include -#include -using namespace Microsoft::VisualStudio::CppUnitTestFramework; - -void GenerateRandomArray(vector& a,int sum) -{ - srand(time(0)); // ʹÓõ±Ç°Ê±¼ä×÷ΪÖÖ×Ó - for (int i = 0; i < sum; i++) { - a.push_back(i); - } -} - - -namespace UnitTest1 -{ - TEST_CLASS(UnitTest1) - { - public: - - TEST_METHOD(TestMethod1) - { - vector arr = { 5,8,4,3,9,1 }; - const vector expect = { 1,3,4,5,8,9 }; - selectionSort(arr); - for(int i= 0;i < arr.size();i++) - { - Assert::AreEqual(expect.at(i), arr.at(i)); - } - } - TEST_METHOD(TestEmptyArr) - { - vector arr = {}; - selectionSort(arr); - Assert::IsTrue(true); - - } - BEGIN_TEST_METHOD_ATTRIBUTE(TestRunTime) - TEST_METHOD_ATTRIBUTE(L"RUN","TIME") - END_TEST_METHOD_ATTRIBUTE(TestRunTime) - TEST_METHOD(TestRunTime) - { - vector arr; - GenerateRandomArray(arr, 10000); // Éú³ÉËæ»úÊý×é - auto start = std::chrono::high_resolution_clock::now(); - selectionSort(arr); - auto end = std::chrono::high_resolution_clock::now(); - auto duration = std::chrono::duration_cast(end - start); - Logger::WriteMessage(("Time: " + std::to_string(duration.count()) + "ms").c_str()); - Assert::IsTrue(duration.count() < 10000); // É趨ãÐÖµ - } - }; -} diff --git a/readme.txt b/readme.txt new file mode 100644 index 0000000..7bd845a --- /dev/null +++ b/readme.txt @@ -0,0 +1 @@ +什么也没有 \ No newline at end of file