Google is committed to advancing racial equity for Black communities. See how.

Inspect.forTesting constructor

Inspect.forTesting(FakeVmoHolder vmo, String name)

Returns a new Inspect object at .inspect backed by a fake VMO intended for unit testing inspect integrations, so that they can run as host tests.

Implementation

factory Inspect.forTesting(FakeVmoHolder vmo, String name) {
  final writer = VmoWriter.withVmo(vmo);
  final fileName = _nextInstanceWithName(name);
  final context = StartupContext.fromStartupInfo();
  return InspectImpl(context.outgoing.debugDir(), fileName, writer);
}