github.com/gwaycc/gometalinter@v3.0.0+incompatible/regressiontests/maligned_test.go (about) 1 package regressiontests 2 3 import "testing" 4 5 func TestMaligned(t *testing.T) { 6 t.Parallel() 7 source := `package test 8 9 type unaligned struct { 10 a uint16 11 b uint64 12 c uint16 13 14 } 15 ` 16 expected := Issues{ 17 {Linter: "maligned", Severity: "warning", Path: "test.go", Line: 3, Col: 16, Message: "struct of size 24 could be 16"}, 18 } 19 ExpectIssues(t, "maligned", source, expected) 20 }