diff options
Diffstat (limited to 'tests/auto/qkeysequence/tst_qkeysequence.cpp')
-rw-r--r-- | tests/auto/qkeysequence/tst_qkeysequence.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/auto/qkeysequence/tst_qkeysequence.cpp b/tests/auto/qkeysequence/tst_qkeysequence.cpp index 3e3f20222b..b1ef223c03 100644 --- a/tests/auto/qkeysequence/tst_qkeysequence.cpp +++ b/tests/auto/qkeysequence/tst_qkeysequence.cpp @@ -119,6 +119,7 @@ private slots: void symetricConstructors_data(); void symetricConstructors(); void checkMultipleNames(); + void checkMultipleCodes(); void mnemonic_data(); void mnemonic(); void toString_data(); @@ -265,6 +266,18 @@ void tst_QKeySequence::checkMultipleNames() QVERIFY( oldK == newK ); } +//TODO: could test third constructor, or test fromString on all constructor-data +void tst_QKeySequence::checkMultipleCodes() +{ + QKeySequence seq1("Alt+d, l"); + QKeySequence seq2 = QKeySequence::fromString("Alt+d, l"); + QVERIFY( seq1 == seq2 ); + + QKeySequence seq3("Alt+d,l"); + QKeySequence seq4 = QKeySequence::fromString("Alt+d,l"); + QVERIFY( seq3 == seq4 ); +} + /* * We must ensure that the keyBindings data is allways sorted * so that we can safely perform binary searches. |