fix: Fix style issues

This commit is contained in:
2023-06-15 21:20:24 +02:00
parent da11e60f79
commit b0bba4fe82
8 changed files with 92 additions and 42 deletions

View File

@@ -203,7 +203,7 @@ void main() {
// Alice now sends 52 messages that Bob decrypts
for (var i = 0; i < 52; i++) {
Logger.root.finest('${i+1}/52');
Logger.root.finest('${i + 1}/52');
final aliceResultLoop = await aliceManager.onOutgoingStanza(
OmemoOutgoingStanza(
[bobJid],
@@ -934,7 +934,10 @@ void main() {
expect(aliceResult.isSuccess(2), isFalse);
expect(aliceResult.deviceEncryptionErrors[cocoJid]!.length, 1);
expect(aliceResult.deviceEncryptionErrors[cocoJid]!.first.error, const TypeMatcher<NoKeyMaterialAvailableError>(),);
expect(
aliceResult.deviceEncryptionErrors[cocoJid]!.first.error,
const TypeMatcher<NoKeyMaterialAvailableError>(),
);
// Bob decrypts it
final bobResult = await bobManager.onIncomingStanza(
@@ -1243,7 +1246,10 @@ void main() {
Logger.root.info('Removing all ratchets for $bobJid');
await aliceManager.removeAllRatchets(bobJid);
expect(aliceManager.getRatchet(RatchetMapKey(bobJid, bobDevice.id)), isNull);
expect(
aliceManager.getRatchet(RatchetMapKey(bobJid, bobDevice.id)),
isNull,
);
// Alice prepares an empty OMEMO message
await aliceManager.sendOmemoHeartbeat(bobJid);

View File

@@ -1,9 +1,12 @@
import 'dart:async';
import 'package:omemo_dart/src/omemo/queue.dart';
import 'package:test/test.dart';
Future<void> testMethod(RatchetAccessQueue queue, List<String> data, int duration) async {
Future<void> testMethod(
RatchetAccessQueue queue,
List<String> data,
int duration,
) async {
await queue.enterCriticalSection(data);
await Future<void>.delayed(Duration(seconds: duration));
@@ -48,7 +51,10 @@ void main() {
expect(queue.runningOperations.length, 4);
expect(
queue.runningOperations.containsAll([
'a', 'b', 'c', 'd',
'a',
'b',
'c',
'd',
]),
isTrue,
);