github.com/filecoin-project/bacalhau@v0.3.23-0.20230228154132-45c989550ace/pkg/model/v1beta1/millicores_test.go (about) 1 package v1beta1 2 3 import ( 4 "testing" 5 6 "github.com/stretchr/testify/require" 7 ) 8 9 var millicoreTestCases map[Millicores]string = map[Millicores]string{ 10 Millicore: "1m", 11 Core: "1", 12 100 * Millicore: "100m", 13 900 * Millicore: "900m", 14 3 * Core: "3", 15 3500 * Millicore: "3500m", 16 } 17 18 func TestMillicoresString(t *testing.T) { 19 for input, expectedString := range millicoreTestCases { 20 t.Run(expectedString, func(t *testing.T) { 21 require.Equal(t, expectedString, input.String()) 22 }) 23 } 24 }