feat: add shortened hex for session IDs throughout, replace nullable getName with null in underlying contacts for individual contacts, build shared lib with release mode, remove todo, fix broken unit test

This commit is contained in:
0x330a
2023-04-17 14:01:30 +10:00
parent 15db31004f
commit 2e673901ba
6 changed files with 17 additions and 14 deletions

View File

@@ -122,7 +122,8 @@ class InstrumentedTests {
nickname = "Nickname 3",
approved = true,
blocked = true,
profilePicture = UserPic("http://example.com/huge.bmp", "qwertyuio01234567890123456789012".encodeToByteArray())
profilePicture = UserPic("http://example.com/huge.bmp", "qwertyuio01234567890123456789012".encodeToByteArray()),
expiryMode = ExpiryMode.NONE
)
contacts2.set(third)
assertTrue(contacts.needsPush())
@@ -261,7 +262,6 @@ class InstrumentedTests {
userProfile.confirmPushed(conf.seqNo, "fakehash2")
newConf.confirmPushed(conf2.seqNo, "fakehash3")
userProfile.dump()
userProfile.dump()
assertFalse(conf.config.contentEquals(conf2.config))
@@ -285,18 +285,18 @@ class InstrumentedTests {
newConf.confirmPushed(newSeqMerge.seqNo, "fakehash5")
assertEquals("Nibbler", newConf.getName())
assertEquals(4, newSeqMerge.seqNo)
assertEquals("Raz", newConf.getName())
assertEquals(3, newSeqMerge.seqNo)
// userProfile device polls and merges
userProfile.merge("fakehash5" to newSeqMerge.config)
val userConfigMerge = userProfile.push()
assertEquals(4, userConfigMerge.seqNo)
assertEquals(3, userConfigMerge.seqNo)
assertEquals("Nibbler", newConf.getName())
assertEquals("Nibbler", userProfile.getName())
assertEquals("Raz", newConf.getName())
assertEquals("Raz", userProfile.getName())
userProfile.free()
newConf.free()

View File

@@ -14,7 +14,7 @@ set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_BUILD_TYPE Debug)
set(CMAKE_BUILD_TYPE Release)
# Creates and names a library, sets it as either STATIC
# or SHARED, and provides the relative paths to its source code.