testing library

Comparing what a game credits against what it actually ships.

import 'package:flutter3d_screens/testing.dart';

final gaps = creditGaps(Credits.models, shippedFrom: 'assets/models');
expect(gaps.uncredited, isEmpty);
expect(gaps.unshipped, isEmpty);

The check that matters reads the directory, not the list beside it. A list of authors compared against another list of authors only ever agrees with itself; what goes wrong is a model dropped into assets/models and into nothing else, which is exactly how an untraced key once arrived in two games at once. The platformer needed the check because it was in breach: two of its models are CC BY, whose text asks that attribution travel with the work, and the game named nobody anywhere.

Why it is here

Credit and the screen that shows it are already this package's; only the list is a game's own. The comparison was not — it was the same twelve lines in three applications' credits_test.dart, down to the wording of the failure messages.

It returns the two sets rather than asserting on them, so that this package does not take flutter_test as a real dependency to save three callers two lines each.

Functions

creditGaps(List<Credit> credited, {required String shippedFrom, String extension = '.glb'}) → ({Set<String> shipped, Set<String> uncredited, Set<String> unshipped})
What is shipped and uncredited, and what is credited and not shipped.