Ivan Folgueira Bande 27de79bda4
First commit
2025-10-16 13:38:59 +02:00

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);
});
});
}