Merge branch 'main' of https://git.stella-ops.org/stella-ops.org/git.stella-ops.org
This commit is contained in:
@@ -74,6 +74,7 @@ public class CorpusFixtureTests
|
||||
File.Exists(truthPath).Should().BeTrue($"{id} missing ground-truth.json");
|
||||
|
||||
using var truthDoc = JsonDocument.Parse(File.ReadAllBytes(truthPath));
|
||||
using StellaOps.TestKit;
|
||||
truthDoc.RootElement.GetProperty("schema_version").GetString().Should().Be(expectedSchemaVersion, $"{id} ground-truth schema_version mismatch");
|
||||
truthDoc.RootElement.GetProperty("case_id").GetString().Should().Be(id, $"{id} ground-truth case_id must match manifest id");
|
||||
|
||||
|
||||
@@ -52,6 +52,7 @@ public sealed class FixtureCoverageTests
|
||||
File.Exists(manifestPath).Should().BeTrue($"{manifestPath} should exist");
|
||||
|
||||
using var doc = JsonDocument.Parse(File.ReadAllBytes(manifestPath));
|
||||
using StellaOps.TestKit;
|
||||
return doc.RootElement.EnumerateArray()
|
||||
.Select(entry => $"{entry.GetProperty("language").GetString()}/{entry.GetProperty("id").GetString()}")
|
||||
.ToArray();
|
||||
|
||||
@@ -66,6 +66,7 @@ public class ReachbenchEvaluationHarnessTests
|
||||
File.Exists(truthPath).Should().BeTrue();
|
||||
|
||||
using var truthDoc = JsonDocument.Parse(File.ReadAllBytes(truthPath));
|
||||
using StellaOps.TestKit;
|
||||
var paths = truthDoc.RootElement.GetProperty("paths");
|
||||
paths.ValueKind.Should().Be(JsonValueKind.Array, $"{caseId}:{variant} should list truth paths as an array");
|
||||
return paths.GetArrayLength();
|
||||
|
||||
@@ -148,6 +148,7 @@ public class ReachbenchFixtureTests
|
||||
var manifestPath = Path.Combine(variantPath, "manifest.json");
|
||||
using var manifestStream = File.OpenRead(manifestPath);
|
||||
using var manifestDoc = JsonDocument.Parse(manifestStream);
|
||||
using StellaOps.TestKit;
|
||||
var files = manifestDoc.RootElement.GetProperty("files");
|
||||
|
||||
foreach (var file in requiredFiles.Where(f => f != "manifest.json"))
|
||||
|
||||
@@ -30,6 +30,7 @@ public class SamplesPublicFixtureTests
|
||||
|
||||
using var stream = File.OpenRead(manifestPath);
|
||||
using var doc = JsonDocument.Parse(stream);
|
||||
using StellaOps.TestKit;
|
||||
doc.RootElement.ValueKind.Should().Be(JsonValueKind.Array);
|
||||
|
||||
var keys = doc.RootElement.EnumerateArray()
|
||||
|
||||
@@ -50,6 +50,7 @@ public sealed class ReplayBundleWriterTests
|
||||
{
|
||||
names.Add(entry.Name);
|
||||
using var ms = new MemoryStream();
|
||||
using StellaOps.TestKit;
|
||||
entry.DataStream!.CopyTo(ms);
|
||||
var text = System.Text.Encoding.UTF8.GetString(ms.ToArray());
|
||||
text.Should().Be(entry.Name.StartsWith("a") ? "alpha" : "beta");
|
||||
|
||||
@@ -330,6 +330,7 @@ public sealed class ScannerToSignalsReachabilityTests
|
||||
if (request.ManifestContent is not null)
|
||||
{
|
||||
await using var manifestBuffer = new MemoryStream();
|
||||
using StellaOps.TestKit;
|
||||
await request.ManifestContent.CopyToAsync(manifestBuffer, cancellationToken).ConfigureAwait(false);
|
||||
manifests[computedHash] = manifestBuffer.ToArray();
|
||||
}
|
||||
|
||||
@@ -145,6 +145,7 @@ public sealed class ReachabilityScoringTests
|
||||
}
|
||||
|
||||
using var doc = JsonDocument.Parse(line);
|
||||
using StellaOps.TestKit;
|
||||
if (doc.RootElement.TryGetProperty("sid", out var sidProp))
|
||||
{
|
||||
runtimeHits.Add(sidProp.GetString()!);
|
||||
|
||||
Reference in New Issue
Block a user