mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 11:18:54 +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) {
|
||||
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)
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user