mirror of
https://github.com/logos-messaging/logos-messaging-dart-bindings.git
synced 2026-03-30 08:23:09 +00:00
28 lines
848 B
Dart
28 lines
848 B
Dart
import 'package:test/test.dart';
|
|
import 'package:waku_dart_bindings/waku.dart'; // Your high-level wrapper
|
|
|
|
void main() {
|
|
group('Waku FFI Tests', () {
|
|
Waku? wakuInstance;
|
|
|
|
setUp(() async {
|
|
// Create a new Waku instance before each test
|
|
wakuInstance = await Waku.newInstance(
|
|
'{ "clusterId": 16, "shards": [ 1, 32, 64, 128, 256 ], "numShardsInNetwork": 257 }');
|
|
});
|
|
|
|
tearDown(() {
|
|
// Optionally: clean up resources if your API exposes a free function
|
|
// e.g., waku_free(wakuInstance?.context);
|
|
wakuInstance?.destroyInstance();
|
|
});
|
|
|
|
test('Start and stop waku instance', () async {
|
|
final startResult = await wakuInstance!.start();
|
|
expect(startResult.callerRet, 0);
|
|
final stopResult = await wakuInstance!.stop();
|
|
expect(stopResult.callerRet, 0);
|
|
});
|
|
});
|
|
}
|