c2pa_testkit_vm library

Dart VM process and filesystem helpers for C2PA differential testing.

Classes

BenchmarkIteration
Measurements produced by one VM-only benchmark iteration.
C2paRsOracle
Runs an explicitly configured, version-pinned c2pa-rs command.
C2paRsOracleCommand
A VM-only command line for invoking a pinned c2pa-rs oracle binary.
C2paRsOracleResult
Captured output from one VM-only c2pa-rs oracle invocation.
VmBenchmarkRunner
Optional wall-clock runner for local benchmarking, not CI assertions.

Functions

loadConformanceFixtureAsset(String indexPath, ConformanceFixture fixture) → Future<Uint8List>
Loads a fixture relative to its index and verifies declared size and SHA-256.
loadConformanceFixtureIndex(String path) → Future<ConformanceFixtureIndex>
Loads a VM-only conformance fixture index from path.
loadConformanceFixtureManifest(String path) → Future<ConformanceFixtureIndex>
Loads a VM-only fixture manifest alias from path.
loadFixtureBytes(String path) → Future<Uint8List>
Loads fixture bytes relative to the package root in VM tests.
loadFixtureString(String path) → Future<String>
Loads fixture text relative to the package root in VM tests.
loadGoldenJson(String path) → Future<Object?>
Loads and decodes a JSON golden from path in VM tests.
loadGoldenJsonObject(String path) → Future<Map<String, Object?>>
Loads a JSON-object golden from path in VM tests.
readBenchmarkResultJson(String path) → Future<BenchmarkResult>
Reads a VM benchmark JSON report from an absolute file path.
readMutationCampaignReport(String path) → Future<MutationCampaignReport>
Reads a VM-only mutation campaign report JSON file from absolute path.
writeBenchmarkResultJson(String path, BenchmarkResult result) → Future<void>
Writes result as pretty JSON to an absolute VM file path.
writeMutationCampaignReport(String path, MutationCampaignReport report) → Future<void>
Writes a mutation campaign report as VM-only JSON to absolute path.

Typedefs

VmBenchmarkOperation = FutureOr<BenchmarkIteration> Function(int iteration, BenchmarkCancellationToken cancellation)
VM-only benchmark body invoked for warmups and measured repetitions.

Exceptions / Errors

C2paRsOracleException
Base class for VM-only oracle subprocess failures.
C2paRsOracleFormatException
An oracle failure caused by non-UTF-8 or malformed JSON output.
C2paRsOracleOutputException
An oracle failure caused by stdout, stderr, or report size limits.
C2paRsOracleTimeoutException
A timeout while waiting for the VM-only oracle subprocess.