bitbucket.org/ai69/amoy@v0.2.3/style_test.go (about)

     1  package amoy
     2  
     3  import (
     4  	"fmt"
     5  	"testing"
     6  )
     7  
     8  func TestStyle(t *testing.T) {
     9  	tests := []struct {
    10  		name string
    11  		val  string
    12  		f    func(string) string
    13  	}{
    14  		{"Email", "hello@example.org", StyleEmail},
    15  	}
    16  	for _, tt := range tests {
    17  		t.Run(tt.name, func(t *testing.T) {
    18  			fmt.Printf("%s = %s\n", FunctionName(tt.f), tt.f(tt.val))
    19  		})
    20  	}
    21  }