15 lines
357 B
Go
15 lines
357 B
Go
package main
|
|
|
|
import (
|
|
"testing"
|
|
)
|
|
|
|
func TestStringexists(t *testing.T) {
|
|
var empty_strings = []string {}
|
|
var three_strings = []string {"first", "second", "third"}
|
|
|
|
AssertEqual(t, stringexists("amything", empty_strings), false)
|
|
AssertEqual(t, stringexists("second", three_strings), true)
|
|
AssertEqual(t, stringexists("fourth", three_strings), false)
|
|
}
|