mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-12 20:18:59 +01:00
graphics: Fix ColorM/GeoM test to clarify inner-initializing
This commit is contained in:
parent
7dfbb7a4c0
commit
7bf41ba8d9
@ -51,7 +51,7 @@ func TestColorInit(t *testing.T) {
|
|||||||
|
|
||||||
func TestColorAssign(t *testing.T) {
|
func TestColorAssign(t *testing.T) {
|
||||||
m := ColorM{}
|
m := ColorM{}
|
||||||
m.Scale(1, 1, 1, 1) // Create elements explicitly
|
m.SetElement(0, 0, 1)
|
||||||
m2 := m
|
m2 := m
|
||||||
m.SetElement(0, 0, 0)
|
m.SetElement(0, 0, 0)
|
||||||
got := m2.Element(0, 0)
|
got := m2.Element(0, 0)
|
||||||
|
@ -50,9 +50,9 @@ func TestGeometryInit(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestGeometryAssign(t *testing.T) {
|
func TestGeometryAssign(t *testing.T) {
|
||||||
m := &GeoM{}
|
m := GeoM{}
|
||||||
m.Scale(1, 1) // Create elements explicitly
|
m.SetElement(0, 0, 1)
|
||||||
m2 := *m
|
m2 := m
|
||||||
m.SetElement(0, 0, 0)
|
m.SetElement(0, 0, 0)
|
||||||
got := m2.Element(0, 0)
|
got := m2.Element(0, 0)
|
||||||
want := 1.0
|
want := 1.0
|
||||||
|
Loading…
Reference in New Issue
Block a user