(t *testing.T)
| 9 | ) |
| 10 | |
| 11 | func TestNewDesktopGeometry(t *testing.T) { |
| 12 | t.Parallel() |
| 13 | |
| 14 | tests := []struct { |
| 15 | name string |
| 16 | nativeWidth int |
| 17 | nativeHeight int |
| 18 | declaredWidth int |
| 19 | declaredHeight int |
| 20 | }{ |
| 21 | { |
| 22 | name: "1366x768_keeps_native_geometry", |
| 23 | nativeWidth: 1366, |
| 24 | nativeHeight: 768, |
| 25 | declaredWidth: 1366, |
| 26 | declaredHeight: 768, |
| 27 | }, |
| 28 | { |
| 29 | name: "1920x1080_prefers_1280x720", |
| 30 | nativeWidth: 1920, |
| 31 | nativeHeight: 1080, |
| 32 | declaredWidth: 1280, |
| 33 | declaredHeight: 720, |
| 34 | }, |
| 35 | { |
| 36 | name: "1920x1200_prefers_1280x800", |
| 37 | nativeWidth: 1920, |
| 38 | nativeHeight: 1200, |
| 39 | declaredWidth: 1280, |
| 40 | declaredHeight: 800, |
| 41 | }, |
| 42 | { |
| 43 | name: "2048x1536_prefers_1024x768", |
| 44 | nativeWidth: 2048, |
| 45 | nativeHeight: 1536, |
| 46 | declaredWidth: 1024, |
| 47 | declaredHeight: 768, |
| 48 | }, |
| 49 | { |
| 50 | name: "3840x2160_prefers_1280x720", |
| 51 | nativeWidth: 3840, |
| 52 | nativeHeight: 2160, |
| 53 | declaredWidth: 1280, |
| 54 | declaredHeight: 720, |
| 55 | }, |
| 56 | { |
| 57 | name: "1568x1000_prefers_1280x816", |
| 58 | nativeWidth: 1568, |
| 59 | nativeHeight: 1000, |
| 60 | declaredWidth: 1280, |
| 61 | declaredHeight: 816, |
| 62 | }, |
| 63 | { |
| 64 | name: "portrait_falls_back_to_generic_scaling", |
| 65 | nativeWidth: 1000, |
| 66 | nativeHeight: 2000, |
| 67 | declaredWidth: 758, |
| 68 | declaredHeight: 1516, |
nothing calls this directly
no test coverage detected