(test) add simple capture test
This commit is contained in:
19
thermion_dart/test/capture_tests.dart
Normal file
19
thermion_dart/test/capture_tests.dart
Normal file
@@ -0,0 +1,19 @@
|
||||
import 'dart:async';
|
||||
import 'dart:ffi';
|
||||
import 'package:test/test.dart';
|
||||
import 'package:thermion_dart/thermion_dart.dart';
|
||||
|
||||
import 'helpers.dart';
|
||||
|
||||
void main() async {
|
||||
final testHelper = TestHelper("render_thread");
|
||||
|
||||
await testHelper.setup();
|
||||
|
||||
test("capture with RGBA byte", () async {
|
||||
await testHelper.withViewer((viewer) async {
|
||||
await testHelper.capture(viewer.view, "capture_rgba_float", pixelDataFormat: PixelDataFormat.RGBA, pixelDataType: PixelDataType.FLOAT);
|
||||
await testHelper.capture(viewer.view, "capture_rgba_byte", pixelDataFormat: PixelDataFormat.RGBA, pixelDataType: PixelDataType.UBYTE);
|
||||
}, bg: kRed);
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user