Fix channel sync and logging

This commit is contained in:
Janez T
2026-03-13 19:24:42 +01:00
parent ced39b6992
commit d5684c51c7
7 changed files with 335 additions and 117 deletions

View File

@@ -45,5 +45,25 @@ void main() {
isFalse,
);
});
test('finds first missing custom channel slot', () {
expect(
ConnectionProvider.firstAvailableChannelSlot(
occupiedIndices: {1, 2, 4},
maxChannels: 6,
),
3,
);
});
test('returns null when all custom channel slots are occupied', () {
expect(
ConnectionProvider.firstAvailableChannelSlot(
occupiedIndices: {1, 2, 3, 4},
maxChannels: 5,
),
isNull,
);
});
});
}