| 47 | } |
| 48 | |
| 49 | void TestVcsEvent::testCopyConstructor() |
| 50 | { |
| 51 | // test plain copy |
| 52 | VcsRevision revision; |
| 53 | revision.setRevisionValue("A", VcsRevision::GlobalNumber); |
| 54 | const QString author("author"); |
| 55 | const QDateTime date = QDateTime::fromString("2001-01-01T00:00:00+00:00", Qt::ISODate); |
| 56 | const QString message("message"); |
| 57 | const QList<VcsItemEvent> items({{}}); |
| 58 | |
| 59 | { |
| 60 | VcsEvent eventA; |
| 61 | setEvent(eventA, |
| 62 | revision, author, date, message, items); |
| 63 | |
| 64 | VcsEvent eventB(eventA); |
| 65 | |
| 66 | compareEvent(eventA, |
| 67 | revision, author, date, message, items); |
| 68 | compareEvent(eventB, |
| 69 | revision, author, date, message, items); |
| 70 | } |
| 71 | |
| 72 | VcsRevision revisionNew; |
| 73 | revisionNew.setRevisionValue(2, VcsRevision::FileNumber); |
| 74 | |
| 75 | // test detach after changing A |
| 76 | { |
| 77 | VcsEvent eventA; |
| 78 | setEvent(eventA, |
| 79 | revision, author, date, message, items); |
| 80 | |
| 81 | VcsEvent eventB(eventA); |
| 82 | // change a property of A |
| 83 | eventA.setRevision(revisionNew); |
| 84 | |
| 85 | compareEvent(eventA, |
| 86 | revisionNew, author, date, message, items); |
| 87 | compareEvent(eventB, |
| 88 | revision, author, date, message, items); |
| 89 | } |
| 90 | } |
| 91 | |
| 92 | void TestVcsEvent::testAssignOperator() |
| 93 | { |
nothing calls this directly
no test coverage detected