Skip to content

Commit

Permalink
add simple tests for quick func
Browse files Browse the repository at this point in the history
  • Loading branch information
inhere committed Apr 8, 2021
1 parent a0e9078 commit e298a5c
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion color_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -383,11 +383,36 @@ func TestQuickFunc(t *testing.T) {
// inline func
testFuncs := []func(...interface{}) {
Redp,
Bluep,
Cyanp,
Grayp,
Greenp,
Yellowp,
Magentap,
}
for _, fn := range testFuncs {
fmt.Println("--- quick inline message print:")
for i, fn := range testFuncs {
if i == 3 {
fmt.Println()
}
fn("inline message,")
}
fmt.Println()

// line func
testFuncs = []func(...interface{}) {
Redln,
Blueln,
Cyanln,
Grayln,
Greenln,
Yellowln,
Magentaln,
}
fmt.Println("--- quick line message print:")
for _, fn := range testFuncs {
fn("quick line message.")
}
}

/*************************************************************
Expand Down

0 comments on commit e298a5c

Please sign in to comment.