mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-07 18:35:34 +00:00
all: clean up code, upgrade to modern Go
Signed-off-by: ddkwork
This commit is contained in:
+10
-5
@@ -31,7 +31,8 @@ func TestFit(t *testing.T) {
|
||||
Dims: image.Point{50, 200},
|
||||
Scale: f32.Point{X: 1, Y: 1},
|
||||
Result: image.Point{X: 50, Y: 100},
|
||||
}},
|
||||
},
|
||||
},
|
||||
Contain: {
|
||||
{
|
||||
Dims: image.Point{50, 25},
|
||||
@@ -41,7 +42,8 @@ func TestFit(t *testing.T) {
|
||||
Dims: image.Point{50, 200},
|
||||
Scale: f32.Point{X: 0.5, Y: 0.5},
|
||||
Result: image.Point{X: 25, Y: 100},
|
||||
}},
|
||||
},
|
||||
},
|
||||
Cover: {
|
||||
{
|
||||
Dims: image.Point{50, 25},
|
||||
@@ -51,7 +53,8 @@ func TestFit(t *testing.T) {
|
||||
Dims: image.Point{50, 200},
|
||||
Scale: f32.Point{X: 2, Y: 2},
|
||||
Result: image.Point{X: 100, Y: 100},
|
||||
}},
|
||||
},
|
||||
},
|
||||
ScaleDown: {
|
||||
{
|
||||
Dims: image.Point{50, 25},
|
||||
@@ -61,7 +64,8 @@ func TestFit(t *testing.T) {
|
||||
Dims: image.Point{50, 200},
|
||||
Scale: f32.Point{X: 0.5, Y: 0.5},
|
||||
Result: image.Point{X: 25, Y: 100},
|
||||
}},
|
||||
},
|
||||
},
|
||||
Fill: {
|
||||
{
|
||||
Dims: image.Point{50, 25},
|
||||
@@ -71,7 +75,8 @@ func TestFit(t *testing.T) {
|
||||
Dims: image.Point{50, 200},
|
||||
Scale: f32.Point{X: 2, Y: 0.5},
|
||||
Result: image.Point{X: 100, Y: 100},
|
||||
}},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
for fit, tests := range fittests {
|
||||
|
||||
Reference in New Issue
Block a user