Refactor code structure and optimize performance across multiple modules
This commit is contained in:
@@ -9,7 +9,8 @@ namespace StellaOps.Scanner.Reachability.Tests;
|
||||
|
||||
public class RichGraphWriterTests
|
||||
{
|
||||
[Fact]
|
||||
[Trait("Category", TestCategories.Unit)]
|
||||
[Fact]
|
||||
public async Task WritesCanonicalGraphAndMeta()
|
||||
{
|
||||
var writer = new RichGraphWriter(CryptoHashFactory.CreateDefault());
|
||||
@@ -38,7 +39,8 @@ public class RichGraphWriterTests
|
||||
Assert.Equal(1, result.EdgeCount);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("Category", TestCategories.Unit)]
|
||||
[Fact]
|
||||
public async Task CarriesSymbolMetadataToRichGraph()
|
||||
{
|
||||
var writer = new RichGraphWriter(CryptoHashFactory.CreateDefault());
|
||||
@@ -65,7 +67,8 @@ public class RichGraphWriterTests
|
||||
Assert.Contains("\"symbol\":{\"mangled\":\"_Zssl_read\",\"demangled\":\"ssl_read\",\"source\":\"DWARF\",\"confidence\":0.9}", json);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("Category", TestCategories.Unit)]
|
||||
[Fact]
|
||||
public async Task WritesGatesOnEdgesWhenPresent()
|
||||
{
|
||||
var writer = new RichGraphWriter(CryptoHashFactory.CreateDefault());
|
||||
@@ -109,13 +112,15 @@ public class RichGraphWriterTests
|
||||
Assert.Contains("\"guard_symbol\":\"sym:dotnet:B\"", json);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("Category", TestCategories.Unit)]
|
||||
[Fact]
|
||||
public async Task UsesBlake3HashForDefaultProfile()
|
||||
{
|
||||
// WIT-013: Verify BLAKE3 is used for graph hashing
|
||||
var writer = new RichGraphWriter(CryptoHashFactory.CreateDefault());
|
||||
using var temp = new TempDir();
|
||||
|
||||
using StellaOps.TestKit;
|
||||
var union = new ReachabilityUnionGraph(
|
||||
Nodes: new[]
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user