From e3edc716efcb40959116e20b41c5344442b21fb9 Mon Sep 17 00:00:00 2001 From: MH Hung Date: Mon, 1 Sep 2025 14:38:58 +0800 Subject: [PATCH] [#1782] test(MaxAverageRatio): Add run test bash and cases describe --- .../test/edge_cases.md | 7 +++++++ .../test/run_tests.sh | 21 +++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 problems/1792-maximum-average-pass-ratio/test/edge_cases.md create mode 100755 problems/1792-maximum-average-pass-ratio/test/run_tests.sh diff --git a/problems/1792-maximum-average-pass-ratio/test/edge_cases.md b/problems/1792-maximum-average-pass-ratio/test/edge_cases.md new file mode 100644 index 0000000..312723e --- /dev/null +++ b/problems/1792-maximum-average-pass-ratio/test/edge_cases.md @@ -0,0 +1,7 @@ +# 邊界情況清單 + +## 需要測試的邊界情況 +- [x] one element in classes +- [x] classes Length >= 1000 +- [x] extraStudent = 1 +- [x] extraStudent = 10000 diff --git a/problems/1792-maximum-average-pass-ratio/test/run_tests.sh b/problems/1792-maximum-average-pass-ratio/test/run_tests.sh new file mode 100755 index 0000000..1137923 --- /dev/null +++ b/problems/1792-maximum-average-pass-ratio/test/run_tests.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +echo "🧪 執行 LeetCode 題目測試" +echo "==========================" + +# 執行 C# 測試 +echo "📋 C# 測試結果:" +cd ../csharp +if dotnet build > /dev/null 2>&1; then + cd ../test + if dotnet test --logger "console;verbosity=minimal" 2>/dev/null; then + echo "✅ C# 測試通過" + else + echo "❌ C# 測試失敗" + fi +else + echo "❌ C# 編譯失敗" +fi + +echo "" +echo "📊 測試完成!"