chore: dummy tests
This commit is contained in:
@@ -1,9 +1,13 @@
|
|||||||
// just for investigating crashes on GitHub actions
|
// just for investigating crashes on GitHub actions
|
||||||
import 'package:test/test.dart';
|
import 'package:test/test.dart';
|
||||||
|
|
||||||
|
import 'helpers.dart';
|
||||||
|
|
||||||
void main() async {
|
void main() async {
|
||||||
group("test", () {
|
group("test", () {
|
||||||
test("test", () {
|
test("test", () {
|
||||||
|
print("Creating test helper");
|
||||||
|
final testHelper = TestHelper("dummy");
|
||||||
expect(1, 1);
|
expect(1, 1);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -73,11 +73,15 @@ class TestHelper {
|
|||||||
|
|
||||||
TestHelper(String dir) {
|
TestHelper(String dir) {
|
||||||
final packageUri = findPackageRoot('thermion_dart');
|
final packageUri = findPackageRoot('thermion_dart');
|
||||||
|
print("Package URIL $packageUri");
|
||||||
testDir = Directory("${packageUri.toFilePath()}/test").path;
|
testDir = Directory("${packageUri.toFilePath()}/test").path;
|
||||||
|
print("Test dir : $packageUri");
|
||||||
|
|
||||||
outDir = Directory("$testDir/output/${dir}");
|
outDir = Directory("$testDir/output/${dir}");
|
||||||
|
print("Out dir : $packageUri");
|
||||||
// outDir.deleteSync(recursive: true);
|
// outDir.deleteSync(recursive: true);
|
||||||
outDir.createSync(recursive: true);
|
outDir.createSync(recursive: true);
|
||||||
|
print("Created out dir : $packageUri");
|
||||||
if (Platform.isMacOS) {
|
if (Platform.isMacOS) {
|
||||||
DynamicLibrary.open('${testDir}/libThermionTextureSwift.dylib');
|
DynamicLibrary.open('${testDir}/libThermionTextureSwift.dylib');
|
||||||
}
|
}
|
||||||
@@ -85,7 +89,6 @@ class TestHelper {
|
|||||||
|
|
||||||
Future capture(ThermionViewer viewer, String outputFilename,
|
Future capture(ThermionViewer viewer, String outputFilename,
|
||||||
{View? view, SwapChain? swapChain, RenderTarget? renderTarget}) async {
|
{View? view, SwapChain? swapChain, RenderTarget? renderTarget}) async {
|
||||||
|
|
||||||
await Future.delayed(Duration(milliseconds: 10));
|
await Future.delayed(Duration(milliseconds: 10));
|
||||||
var outPath = p.join(outDir.path, "$outputFilename.bmp");
|
var outPath = p.join(outDir.path, "$outputFilename.bmp");
|
||||||
|
|
||||||
@@ -102,7 +105,6 @@ class TestHelper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Future<ThermionTextureSwift> createTexture(int width, int height) async {
|
Future<ThermionTextureSwift> createTexture(int width, int height) async {
|
||||||
|
|
||||||
final object = ThermionTextureSwift.new1();
|
final object = ThermionTextureSwift.new1();
|
||||||
object.initWithWidth_height_(width, height);
|
object.initWithWidth_height_(width, height);
|
||||||
return object;
|
return object;
|
||||||
|
|||||||
Reference in New Issue
Block a user