graphics: Fix ColorM/GeoM test to clarify inner-initializing

This commit is contained in:
Hajime Hoshi 2016-10-30 20:26:38 +09:00
parent 7dfbb7a4c0
commit 7bf41ba8d9
2 changed files with 4 additions and 4 deletions

View File

@ -51,7 +51,7 @@ func TestColorInit(t *testing.T) {
func TestColorAssign(t *testing.T) {
m := ColorM{}
m.Scale(1, 1, 1, 1) // Create elements explicitly
m.SetElement(0, 0, 1)
m2 := m
m.SetElement(0, 0, 0)
got := m2.Element(0, 0)

View File

@ -50,9 +50,9 @@ func TestGeometryInit(t *testing.T) {
}
func TestGeometryAssign(t *testing.T) {
m := &GeoM{}
m.Scale(1, 1) // Create elements explicitly
m2 := *m
m := GeoM{}
m.SetElement(0, 0, 1)
m2 := m
m.SetElement(0, 0, 0)
got := m2.Element(0, 0)
want := 1.0