From 889636fff4b096ed5c38b86bba3aa88367b43efe Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 2 Apr 2026 13:47:00 +0100 Subject: [PATCH] ax(mining): replace prose comments with usage examples in manager_test.go AX Principle 2: comments must show HOW with real values, not restate the function name. Four prose comments replaced with concrete call examples showing inputs and expected outcomes. Co-Authored-By: Charon --- pkg/mining/manager_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/mining/manager_test.go b/pkg/mining/manager_test.go index 3ee1a96..db4456c 100644 --- a/pkg/mining/manager_test.go +++ b/pkg/mining/manager_test.go @@ -40,7 +40,7 @@ func setupTestManager(t *testing.T) *Manager { return NewManager() } -// TestStartMiner tests the StartMiner function +// miner, err := m.StartMiner(ctx, "xmrig", config) func TestStartMiner_Good(t *testing.T) { t.Skip("Skipping test that runs miner process as per request") } @@ -66,7 +66,7 @@ func TestStartMiner_Ugly(t *testing.T) { t.Skip("Skipping test that runs miner process") } -// TestStopMiner tests the StopMiner function +// err := m.StopMiner(ctx, "xmrig"); // stops and removes the named miner func TestStopMiner_Good(t *testing.T) { t.Skip("Skipping test that runs miner process") } @@ -82,7 +82,7 @@ func TestStopMiner_Bad(t *testing.T) { } } -// TestGetMiner tests the GetMiner function +// miner, err := m.GetMiner("xmrig"); miner.GetName() == "xmrig" func TestGetMiner_Good(t *testing.T) { m := setupTestManager(t) defer m.Stop() @@ -116,7 +116,7 @@ func TestGetMiner_Bad(t *testing.T) { } } -// TestListMiners tests the ListMiners function +// miners := m.ListMiners(); len(miners) == 1 after injecting one miner func TestListMiners_Good(t *testing.T) { m := setupTestManager(t) defer m.Stop()