github.com/quantumghost/awgo@v0.15.0/icons_test.go (about)

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