Fixes assertion
This commit is contained in:
+1
-1
@@ -696,7 +696,7 @@ class ChessLobbyLogic(
|
||||
// Check status FIRST to avoid briefly emitting a finished game through activeGames
|
||||
val gameStatus = result.liveState.gameStatus.value
|
||||
if (gameStatus is GameStatus.Finished) {
|
||||
Log.d("chessdebug") { "[Lobby] refreshGame: game ${startEventId.take(8)} is FINISHED (${(gameStatus as GameStatus.Finished).result}), moving to completed" }
|
||||
Log.d("chessdebug") { "[Lobby] refreshGame: game ${startEventId.take(8)} is FINISHED (${gameStatus.result}), moving to completed" }
|
||||
state.moveToCompleted(startEventId, gameStatus.result.notation, null)
|
||||
pollingDelegate.removeGameId(startEventId)
|
||||
} else {
|
||||
|
||||
+2
-1
@@ -24,6 +24,7 @@ import kotlin.test.Test
|
||||
import kotlin.test.assertEquals
|
||||
import kotlin.test.assertNotNull
|
||||
import kotlin.test.assertNull
|
||||
import kotlin.test.assertTrue
|
||||
|
||||
class BleChunkAssemblerTest {
|
||||
@Test
|
||||
@@ -43,7 +44,7 @@ class BleChunkAssemblerTest {
|
||||
val assembler = BleChunkAssembler()
|
||||
val message = """["EVENT",{"content":"hello world from nostr ble mesh networking"}]"""
|
||||
val chunks = BleMessageChunker.splitIntoChunks(message, chunkSize = 10)
|
||||
assert(chunks.size > 1)
|
||||
assertTrue(chunks.size > 1)
|
||||
|
||||
for (i in 0 until chunks.size - 1) {
|
||||
val result = assembler.addChunk(chunks[i])
|
||||
|
||||
Reference in New Issue
Block a user