mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 23:50:41 -05:00
tests/monitor-transform: Also test invert()
Commit e06daa58c3
changed the tested values to use corresponding valid
enum values instead of negative ones. Unfortunately that made one value
become a duplicate of an existing one and also in part defeated the original
intention of checking the implementation of
`meta_output_crtc_to_logical_transform`.
Use `meta_monitor_transform_invert` to fix both shortcomings.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1242
This commit is contained in:
parent
cfa2d1abf7
commit
dec97a6541
@ -52,6 +52,7 @@ meta_monitor_transform_is_flipped (MetaMonitorTransform transform)
|
||||
return (transform >= META_MONITOR_TRANSFORM_FLIPPED);
|
||||
}
|
||||
|
||||
META_EXPORT_TEST
|
||||
MetaMonitorTransform meta_monitor_transform_invert (MetaMonitorTransform transform);
|
||||
|
||||
META_EXPORT_TEST
|
||||
|
@ -62,22 +62,23 @@ test_transform (void)
|
||||
},
|
||||
{
|
||||
.transform = META_MONITOR_TRANSFORM_NORMAL,
|
||||
.other = META_MONITOR_TRANSFORM_270,
|
||||
.other = meta_monitor_transform_invert (META_MONITOR_TRANSFORM_90),
|
||||
.expect = META_MONITOR_TRANSFORM_270,
|
||||
},
|
||||
{
|
||||
.transform = META_MONITOR_TRANSFORM_FLIPPED,
|
||||
.other = META_MONITOR_TRANSFORM_270,
|
||||
.other = meta_monitor_transform_invert (META_MONITOR_TRANSFORM_90),
|
||||
.expect = META_MONITOR_TRANSFORM_FLIPPED_270,
|
||||
},
|
||||
{
|
||||
.transform = META_MONITOR_TRANSFORM_FLIPPED_180,
|
||||
.other = META_MONITOR_TRANSFORM_90,
|
||||
.other = meta_monitor_transform_invert (META_MONITOR_TRANSFORM_270),
|
||||
.expect = META_MONITOR_TRANSFORM_FLIPPED_270,
|
||||
},
|
||||
{
|
||||
.transform = META_MONITOR_TRANSFORM_FLIPPED_180,
|
||||
.other = META_MONITOR_TRANSFORM_FLIPPED_180,
|
||||
.other =
|
||||
meta_monitor_transform_invert (META_MONITOR_TRANSFORM_FLIPPED_180),
|
||||
.expect = META_MONITOR_TRANSFORM_NORMAL,
|
||||
},
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user