testing library
The NetTransport conformance suite, as library code so that every backend can run the same one.
import 'package:good_net/testing.dart';
void main() {
runNetTransportConformance('p2p', create: P2PNetTransport.new);
}
Separate from good_net.dart so that a game importing the engine does not
also import a test framework.
Functions
-
runNetTransportConformance(
String backend, {required NetTransport create(), Future< void> settle()?, void tearDownAll()?}) → void - Every rule NetTransport states, as tests, so that a backend proves it rather than intending it.