- Introduced a new Flutter project for the cxyz Android manga/comic reader, including essential files such as pubspec.yaml, AndroidManifest.xml, and Gradle configuration. - Added .gitignore files to exclude unnecessary files and directories for both the main project and Android-specific files. - Implemented initial README.md with project description, features, setup instructions, and API details for ComicLand, MangaRead, and MangaTown. - Configured analysis options and dependencies in pubspec.yaml to support Flutter development. - Established a pnpm workspace and lockfile for dependency management. - Included various Android resources such as icons, styles, and launch backgrounds for a complete application setup.
28 lines
860 B
Dart
28 lines
860 B
Dart
import 'package:flutter_test/flutter_test.dart';
|
|
import 'package:cxyz_android/sources/mangaread/mangaread_source.dart';
|
|
import 'package:cxyz_android/sources/source.dart';
|
|
|
|
void main() {
|
|
test('latest pagination maps offset/limit to distinct site pages', () async {
|
|
final source = MangaReadSource();
|
|
final page1 = await source.loadCatalog(
|
|
CatalogMenuKind.latest,
|
|
offset: 0,
|
|
limit: 30,
|
|
);
|
|
final page2 = await source.loadCatalog(
|
|
CatalogMenuKind.latest,
|
|
offset: 30,
|
|
limit: 30,
|
|
);
|
|
|
|
expect(page1, isNotEmpty);
|
|
expect(page2, isNotEmpty);
|
|
expect(page1.first.slug, isNot(page2.first.slug));
|
|
final overlap = page1.map((c) => c.slug).toSet().intersection(
|
|
page2.map((c) => c.slug).toSet(),
|
|
);
|
|
expect(overlap, isEmpty);
|
|
}, timeout: const Timeout(Duration(seconds: 60)));
|
|
}
|