You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
navigator.lua/playground/go/test/func_test.go

23 lines
327 B
Go

package test
import (
"fmt"
"testing"
)
func TestDog(t *testing.T) {
d := NewDog("Fibi", 4)
fmt.Println(d.name)
if d.name != "Fibi" {
t.Errorf("NewDog failled %v", d)
}
}
func TestCat(t *testing.T) {
d := NewDog("Fibi cat", 4)
fmt.Println(d.name)
if d.name != "Fibi cat" {
t.Errorf("NewDog failled %v", d)
}
}