| 43 | } |
| 44 | |
| 45 | void TestVcsItemEvent::testCopyConstructor() |
| 46 | { |
| 47 | // test plain copy |
| 48 | const QString repositoryLocation("location"); |
| 49 | const QString repositoryCopySourceLocation("copy source location"); |
| 50 | VcsRevision repositoryCopySourceRevision; |
| 51 | repositoryCopySourceRevision.setRevisionValue("A", VcsRevision::GlobalNumber); |
| 52 | const VcsItemEvent::Actions actions = VcsItemEvent::Added; |
| 53 | |
| 54 | { |
| 55 | VcsItemEvent itemEventA; |
| 56 | setItemEvent(itemEventA, |
| 57 | repositoryLocation, repositoryCopySourceLocation, repositoryCopySourceRevision, actions); |
| 58 | |
| 59 | VcsItemEvent itemEventB(itemEventA); |
| 60 | |
| 61 | compareItemEvent(itemEventA, |
| 62 | repositoryLocation, repositoryCopySourceLocation, repositoryCopySourceRevision, |
| 63 | actions); |
| 64 | compareItemEvent(itemEventB, |
| 65 | repositoryLocation, repositoryCopySourceLocation, repositoryCopySourceRevision, |
| 66 | actions); |
| 67 | } |
| 68 | |
| 69 | const QString repositoryLocationNew("new location"); |
| 70 | |
| 71 | // test detach after changing A |
| 72 | { |
| 73 | VcsItemEvent itemEventA; |
| 74 | setItemEvent(itemEventA, |
| 75 | repositoryLocation, repositoryCopySourceLocation, repositoryCopySourceRevision, actions); |
| 76 | |
| 77 | VcsItemEvent itemEventB(itemEventA); |
| 78 | // change a property of A |
| 79 | itemEventA.setRepositoryLocation(repositoryLocationNew); |
| 80 | |
| 81 | compareItemEvent(itemEventA, |
| 82 | repositoryLocationNew, repositoryCopySourceLocation, repositoryCopySourceRevision, |
| 83 | actions); |
| 84 | compareItemEvent(itemEventB, |
| 85 | repositoryLocation, repositoryCopySourceLocation, repositoryCopySourceRevision, |
| 86 | actions); |
| 87 | } |
| 88 | } |
| 89 | |
| 90 | void TestVcsItemEvent::testAssignOperator() |
| 91 | { |
nothing calls this directly
no test coverage detected