We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3c5ad95 commit 62ccad7Copy full SHA for 62ccad7
qttypes/src/lib.rs
@@ -1706,6 +1706,25 @@ impl fmt::Debug for QStringList {
1706
}
1707
1708
1709
+#[test]
1710
+fn test_qstringlist() {
1711
+ let mut qstringlist = QStringList::new();
1712
+ qstringlist.push("One".into());
1713
+ qstringlist.push("Two".into());
1714
+
1715
+ assert_eq!(qstringlist.len(), 2);
1716
+ assert_eq!(qstringlist[0], QString::from("One"));
1717
1718
+ qstringlist.remove(0);
1719
+ assert_eq!(qstringlist[0], QString::from("Two"));
1720
1721
+ qstringlist.insert(0, "Three".into());
1722
+ assert_eq!(qstringlist[0], QString::from("Three"));
1723
1724
+ qstringlist.clear();
1725
+ assert_eq!(qstringlist.len(), 0);
1726
+}
1727
1728
cpp_class!(
1729
/// Wrapper around [`QJsonObject`][class] class.
1730
///
0 commit comments