]> git.sesse.net Git - mlt/blobdiff - src/tests/test_properties/test_properties.cpp
Interpret % after numeric string.
[mlt] / src / tests / test_properties / test_properties.cpp
index d496e4c84cc35986a82d85b52277f6ee5d180372..206cd6943f12e1b8580dfc100e97d1a3e653826e 100644 (file)
@@ -649,6 +649,15 @@ private Q_SLOTS:
         QCOMPARE(mlt_property_get_int_pos(p, fps, locale, 30, 100), 300);
         mlt_property_close(p);
     }
+
+    void PercentAsRatio()
+    {
+        Properties p;
+        p.set("foo", "12.3%");
+        QCOMPARE(p.get_double("foo"), 0.123);
+        p.set("foo", "456 %");
+        QCOMPARE(p.get_double("foo"), 456.0);
+    }
 };
 
 QTEST_APPLESS_MAIN(TestProperties)