github.com/ChicK00o/awgo@v0.29.4/icons_test.go (about) 1 // Copyright (c) 2018 Dean Jackson <deanishe@deanishe.net> 2 // MIT Licence - http://opensource.org/licenses/MIT 3 4 package aw 5 6 import ( 7 "os" 8 "testing" 9 10 "github.com/stretchr/testify/assert" 11 ) 12 13 func TestIcons(t *testing.T) { 14 t.Parallel() 15 16 icons := []*Icon{ 17 IconAccount, 18 IconBurn, 19 IconClock, 20 IconColor, 21 IconColour, 22 IconEject, 23 IconError, 24 IconFavorite, 25 IconFavourite, 26 IconGroup, 27 IconHelp, 28 IconHome, 29 IconInfo, 30 IconNetwork, 31 IconNote, 32 IconSettings, 33 IconSwirl, 34 IconSwitch, 35 IconSync, 36 IconTrash, 37 IconUser, 38 IconWarning, 39 IconWeb, 40 } 41 for _, icon := range icons { 42 icon := icon 43 t.Run(icon.Value, func(t *testing.T) { 44 assert.Equal(t, IconType(""), icon.Type, "icon.Type is not empty") 45 46 // Skip path validation on CI because it's a Linux box 47 if os.Getenv("TRAVIS") != "" { 48 return 49 } 50 _, err := os.Stat(icon.Value) 51 assert.Nil(t, err, "stat failed") 52 }) 53 } 54 }