mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-02-27 21:24:42 +00:00
Rename GV2 "version" to "revision".
This commit is contained in:
committed by
Greyson Parrelli
parent
c634c24afb
commit
a99c0d438e
@@ -545,9 +545,9 @@ public final class GroupsV2UpdateMessageProducerTest {
|
||||
|
||||
private final DecryptedGroup.Builder builder;
|
||||
|
||||
GroupStateBuilder(@NonNull UUID foundingMember, int version) {
|
||||
GroupStateBuilder(@NonNull UUID foundingMember, int revision) {
|
||||
builder = DecryptedGroup.newBuilder()
|
||||
.setVersion(version)
|
||||
.setRevision(revision)
|
||||
.addMembers(DecryptedMember.newBuilder()
|
||||
.setUuid(UuidUtil.toByteString(foundingMember)));
|
||||
}
|
||||
|
||||
@@ -14,32 +14,32 @@ public final class GlobalGroupStateTest {
|
||||
public void cannot_ask_latestVersionNumber_of_empty_state() {
|
||||
GlobalGroupState emptyState = new GlobalGroupState(null, emptyList());
|
||||
|
||||
emptyState.getLatestVersionNumber();
|
||||
emptyState.getLatestRevisionNumber();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void latestVersionNumber_of_state_and_empty_list() {
|
||||
public void latestRevisionNumber_of_state_and_empty_list() {
|
||||
GlobalGroupState emptyState = new GlobalGroupState(state(10), emptyList());
|
||||
|
||||
assertEquals(10, emptyState.getLatestVersionNumber());
|
||||
assertEquals(10, emptyState.getLatestRevisionNumber());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void latestVersionNumber_of_state_and_list() {
|
||||
public void latestRevisionNumber_of_state_and_list() {
|
||||
GlobalGroupState emptyState = new GlobalGroupState(state(2), asList(logEntry(3), logEntry(4)));
|
||||
|
||||
assertEquals(4, emptyState.getLatestVersionNumber());
|
||||
assertEquals(4, emptyState.getLatestRevisionNumber());
|
||||
}
|
||||
|
||||
private static GroupLogEntry logEntry(int version) {
|
||||
return new GroupLogEntry(state(version), change(version));
|
||||
private static GroupLogEntry logEntry(int revision) {
|
||||
return new GroupLogEntry(state(revision), change(revision));
|
||||
}
|
||||
|
||||
private static DecryptedGroup state(int version) {
|
||||
return DecryptedGroup.newBuilder().setVersion(version).build();
|
||||
private static DecryptedGroup state(int revision) {
|
||||
return DecryptedGroup.newBuilder().setRevision(revision).build();
|
||||
}
|
||||
|
||||
private static DecryptedGroupChange change(int version) {
|
||||
return DecryptedGroupChange.newBuilder().setVersion(version).build();
|
||||
private static DecryptedGroupChange change(int revision) {
|
||||
return DecryptedGroupChange.newBuilder().setRevision(revision).build();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -115,7 +115,7 @@ public final class GroupStateMapperTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void apply_maximum_group_versions() {
|
||||
public void apply_maximum_group_revisions() {
|
||||
DecryptedGroup currentState = state(Integer.MAX_VALUE - 2);
|
||||
GroupLogEntry log1 = logEntry(Integer.MAX_VALUE - 1);
|
||||
GroupLogEntry log2 = logEntry(Integer.MAX_VALUE);
|
||||
@@ -132,15 +132,15 @@ public final class GroupStateMapperTest {
|
||||
assertThat(actual.getHistory(), is(expected.getHistory()));
|
||||
}
|
||||
|
||||
private static GroupLogEntry logEntry(int version) {
|
||||
return new GroupLogEntry(state(version), change(version));
|
||||
private static GroupLogEntry logEntry(int revision) {
|
||||
return new GroupLogEntry(state(revision), change(revision));
|
||||
}
|
||||
|
||||
private static DecryptedGroup state(int version) {
|
||||
return DecryptedGroup.newBuilder().setVersion(version).build();
|
||||
private static DecryptedGroup state(int revision) {
|
||||
return DecryptedGroup.newBuilder().setRevision(revision).build();
|
||||
}
|
||||
|
||||
private static DecryptedGroupChange change(int version) {
|
||||
return DecryptedGroupChange.newBuilder().setVersion(version).build();
|
||||
private static DecryptedGroupChange change(int revision) {
|
||||
return DecryptedGroupChange.newBuilder().setRevision(revision).build();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user