Install any skill in seconds. Free to start, no credit card required.
Get Started Free →loulanyue/golang-testing
テスト駆動開発とGoコードの高品質を保証するための包括的なテスト戦略。
Passed 24 of 24 test cases with the skill, and 20 of 24 without it.
and 2 more in the full report
4 fixed20 passed either way0 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 4 test cases the skill fixed. Same model, same prompt, with and without the skill.
我們正要在 Go 專案中採用 TDD 開發一個計算器套件 `calculator`。第一步我們定義了 `Add(a, b int) int` 函式簽章。在寫出測試前,這個未實現的函式內容應該擺放什麼?
| Checked | Without skill | With skill |
|---|---|---|
| Recommends using panic("not implemented") as the placeholder implementation prior to writing failing tests. | Missed | Passed |
The instructions your model reads when the skill loads.
用於撰寫可靠、可維護測試的完整 Go 測試模式,遵循 TDD 方法論。
RED → 先寫失敗的測試
GREEN → 撰寫最少程式碼使測試通過
REFACTOR → 在保持測試綠色的同時改善程式碼
REPEAT → 繼續下一個需求
// 步驟 1:定義介面/簽章
// calculator.go
package calculator
func Add(a, b int) int {
panic("not implemented") // 佔位符
}
// 步驟 2:撰寫失敗測試(RED)
// calculator_test.go
package calculator
import "testing"
test cases passed, vs 20 / 24 without
Published skills whose descriptions closely match this one, with their headline benchmark lift.
More skills from the same source and nearby in the registry, with their headline benchmark lift.