github.com/ActiveState/cli@v0.0.0-20240508170324-6801f60cd051/pkg/platform/runtime/target/target_test.go (about) 1 package target 2 3 import "testing" 4 5 func TestTrigger_IndicatesUsage(t *testing.T) { 6 tests := []struct { 7 name string 8 t Trigger 9 want bool 10 }{ 11 { 12 "Activate counts as usage", 13 TriggerActivate, 14 true, 15 }, 16 { 17 "Reset exec does not count as usage", 18 TriggerResetExec, 19 false, 20 }, 21 } 22 for _, tt := range tests { 23 t.Run(tt.name, func(t *testing.T) { 24 if got := tt.t.IndicatesUsage(); got != tt.want { 25 t.Errorf("IndicatesUsage() = %v, want %v", got, tt.want) 26 } 27 }) 28 } 29 }