summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorNikolai Kosjar <nikolai.kosjar@theqtcompany.com>2015-09-30 16:29:25 +0200
committerNikolai Kosjar <nikolai.kosjar@theqtcompany.com>2015-09-30 14:44:09 +0000
commit1c7fb225db61864c4122d6e396315f13ce2d8f97 (patch)
tree35c32fd13a00c3fd28e28fd3cd15b3f0fb835c6f /tests
parent1a0c618ef2e402bc28496cedcce36ee70c3f0b25 (diff)
downloadqt-creator-1c7fb225db61864c4122d6e396315f13ce2d8f97.tar.gz
Clang: Add one more test for SendDocumentTracker
Ensure that the document is not send with initial values. In that case, the document was just loaded and has not any modified content yet. Change-Id: I67ee8dcffe20779ef8294cf2668d0974b44f5bbb Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/unittest/senddocumenttrackertest.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/unit/unittest/senddocumenttrackertest.cpp b/tests/unit/unittest/senddocumenttrackertest.cpp
index daf6b0083b..3acd9cf607 100644
--- a/tests/unit/unittest/senddocumenttrackertest.cpp
+++ b/tests/unit/unittest/senddocumenttrackertest.cpp
@@ -133,6 +133,11 @@ TEST_F(SendDocumentTracker, SendRevisionIfRevisionIsDifferent)
ASSERT_TRUE(tracker.shouldSendRevision(21));
}
+TEST_F(SendDocumentTracker, DontSendRevisionWithDefaults)
+{
+ ASSERT_FALSE(tracker.shouldSendRevisionWithCompletionPosition(21, 33));
+}
+
TEST_F(SendDocumentTracker, DontSendIfRevisionIsDifferentAndCompletionPositionIsEqualAndNoContentChange)
{
tracker.setLastSentRevision(46);