Also run the ffi integration tests on android

This commit is contained in:
Simon Binder 2019-09-14 21:30:38 +02:00
parent 30e44ecbac
commit ae8ed3aedf
No known key found for this signature in database
GPG Key ID: 7891917E4147B8C0
3 changed files with 29 additions and 3 deletions

View File

@ -1,6 +1,7 @@
import 'dart:io';
import 'package:flutter/services.dart';
import 'package:moor_ffi/moor_ffi.dart';
import 'package:tests/tests.dart';
import 'package:test/test.dart';
import 'package:moor_flutter/moor_flutter.dart';
@ -27,8 +28,24 @@ class SqfliteExecutor extends TestExecutor {
}
}
class FfiExecutor extends TestExecutor {
@override
QueryExecutor createExecutor() {
return VmDatabase(File('app_ffi.db'));
}
@override
Future deleteData() async {
final file = File('app_ffi.db');
if (await file.exists()) {
await file.delete();
}
}
}
void main() {
runAllTests(SqfliteExecutor());
runAllTests(FfiExecutor());
// Additional integration test for flutter: Test loading a database from asset
test('can load a database from asset', () async {

View File

@ -159,7 +159,7 @@ packages:
name: meta
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.6"
version: "1.1.7"
mime:
dependency: transitive
description:
@ -173,7 +173,14 @@ packages:
path: "../../../moor"
relative: true
source: path
version: "1.7.1"
version: "1.7.2"
moor_ffi:
dependency: "direct main"
description:
path: "../../../moor_ffi"
relative: true
source: path
version: "0.0.1"
moor_flutter:
dependency: "direct main"
description:
@ -404,5 +411,5 @@ packages:
source: hosted
version: "2.1.16"
sdks:
dart: ">=2.4.0 <3.0.0"
dart: ">=2.5.0-dev <2.6.0"
flutter: ">=1.2.1 <2.0.0"

View File

@ -11,6 +11,8 @@ dependencies:
moor_flutter:
tests:
path: ../tests
moor_ffi:
path: ../../../moor_ffi
dev_dependencies:
test: