[mutter] tests: Expect <rate> to always have three decimal places (rounded)



commit a2636ce2df1f010f1bf6b22adee63b1fb991ef78
Author: Daniel van Vugt <daniel van vugt canonical com>
Date:   Thu Jun 16 14:44:55 2022 +0800

    tests: Expect <rate> to always have three decimal places (rounded)
    
    At least when the XML is written by mutter it will have three decimal
    places. We don't enforce any precision requirements when reading the
    XML.
    
    Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2465>

 src/tests/migration/basic-new.xml            | 8 ++++----
 src/tests/migration/first-rotated-new.xml    | 4 ++--
 src/tests/migration/oneoff-new.xml           | 2 +-
 src/tests/migration/rotated-new-finished.xml | 2 +-
 src/tests/migration/rotated-new.xml          | 2 +-
 src/tests/migration/tiled-new.xml            | 2 +-
 src/tests/migration/wiggle-new-finished.xml  | 2 +-
 src/tests/migration/wiggle-new.xml           | 2 +-
 8 files changed, 12 insertions(+), 12 deletions(-)
---
diff --git a/src/tests/migration/basic-new.xml b/src/tests/migration/basic-new.xml
index 569d1e7cd9..9da5123556 100644
--- a/src/tests/migration/basic-new.xml
+++ b/src/tests/migration/basic-new.xml
@@ -14,7 +14,7 @@
         <mode>
           <width>3840</width>
           <height>2160</height>
-          <rate>29.981103897094727</rate>
+          <rate>29.981</rate>
         </mode>
       </monitor>
     </logicalmonitor>
@@ -32,7 +32,7 @@
         <mode>
           <width>1920</width>
           <height>1080</height>
-          <rate>60.049972534179688</rate>
+          <rate>60.050</rate>
         </mode>
       </monitor>
     </logicalmonitor>
@@ -52,7 +52,7 @@
         <mode>
           <width>1920</width>
           <height>1080</height>
-          <rate>60</rate>
+          <rate>60.000</rate>
         </mode>
       </monitor>
     </logicalmonitor>
@@ -70,7 +70,7 @@
         <mode>
           <width>1920</width>
           <height>1080</height>
-          <rate>60.049468994140625</rate>
+          <rate>60.049</rate>
         </mode>
       </monitor>
     </logicalmonitor>
diff --git a/src/tests/migration/first-rotated-new.xml b/src/tests/migration/first-rotated-new.xml
index 9f875c21f4..0026170547 100644
--- a/src/tests/migration/first-rotated-new.xml
+++ b/src/tests/migration/first-rotated-new.xml
@@ -18,7 +18,7 @@
         <mode>
           <width>3840</width>
           <height>2160</height>
-          <rate>29.981103897094727</rate>
+          <rate>29.981</rate>
         </mode>
       </monitor>
     </logicalmonitor>
@@ -36,7 +36,7 @@
         <mode>
           <width>1920</width>
           <height>1080</height>
-          <rate>60.049972534179688</rate>
+          <rate>60.050</rate>
         </mode>
       </monitor>
     </logicalmonitor>
diff --git a/src/tests/migration/oneoff-new.xml b/src/tests/migration/oneoff-new.xml
index 02d85f4ded..a55647abf1 100644
--- a/src/tests/migration/oneoff-new.xml
+++ b/src/tests/migration/oneoff-new.xml
@@ -15,7 +15,7 @@
         <mode>
           <width>800</width>
           <height>600</height>
-          <rate>60</rate>
+          <rate>60.000</rate>
         </mode>
       </monitor>
     </logicalmonitor>
diff --git a/src/tests/migration/rotated-new-finished.xml b/src/tests/migration/rotated-new-finished.xml
index a67c376dc5..dedadefd5b 100644
--- a/src/tests/migration/rotated-new-finished.xml
+++ b/src/tests/migration/rotated-new-finished.xml
@@ -19,7 +19,7 @@
         <mode>
           <width>800</width>
           <height>600</height>
-          <rate>60</rate>
+          <rate>60.000</rate>
         </mode>
       </monitor>
     </logicalmonitor>
diff --git a/src/tests/migration/rotated-new.xml b/src/tests/migration/rotated-new.xml
index f419645462..6feed883cd 100644
--- a/src/tests/migration/rotated-new.xml
+++ b/src/tests/migration/rotated-new.xml
@@ -19,7 +19,7 @@
         <mode>
           <width>800</width>
           <height>600</height>
-          <rate>60</rate>
+          <rate>60.000</rate>
         </mode>
       </monitor>
     </logicalmonitor>
diff --git a/src/tests/migration/tiled-new.xml b/src/tests/migration/tiled-new.xml
index 9fe285ac83..3ac1d8b7e6 100644
--- a/src/tests/migration/tiled-new.xml
+++ b/src/tests/migration/tiled-new.xml
@@ -15,7 +15,7 @@
         <mode>
           <width>3840</width>
           <height>2160</height>
-          <rate>60</rate>
+          <rate>60.000</rate>
         </mode>
       </monitor>
     </logicalmonitor>
diff --git a/src/tests/migration/wiggle-new-finished.xml b/src/tests/migration/wiggle-new-finished.xml
index c4a56556f9..e023d16dee 100644
--- a/src/tests/migration/wiggle-new-finished.xml
+++ b/src/tests/migration/wiggle-new-finished.xml
@@ -19,7 +19,7 @@
         <mode>
           <width>800</width>
           <height>600</height>
-          <rate>60.000801086425781</rate>
+          <rate>60.001</rate>
         </mode>
       </monitor>
     </logicalmonitor>
diff --git a/src/tests/migration/wiggle-new.xml b/src/tests/migration/wiggle-new.xml
index cd1acf7176..4ab4cdee7d 100644
--- a/src/tests/migration/wiggle-new.xml
+++ b/src/tests/migration/wiggle-new.xml
@@ -19,7 +19,7 @@
         <mode>
           <width>800</width>
           <height>600</height>
-          <rate>60.000801086425781</rate>
+          <rate>60.001</rate>
         </mode>
       </monitor>
     </logicalmonitor>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]