mirror of
https://github.com/par274/sharpemu.git
synced 2026-08-30 21:31:57 +08:00
feat(hle): prefer loaded guest exports for selected registrations (#844)
Co-authored-by: Acelogic <miguelc4600@gmail.com>
This commit is contained in:
@@ -53,6 +53,40 @@ public sealed class SysAbiExportAnalyzerTests
|
||||
AssertSingle(diagnostics, "SHEM001");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void DuplicateNidOnTheSameMultiAttributeHandlerIsReported()
|
||||
{
|
||||
var diagnostics = Analyze("""
|
||||
using SharpEmu.HLE;
|
||||
|
||||
public static class Exports
|
||||
{
|
||||
[SysAbiExport(Nid = "Zxa0VhQVTsk", ExportName = "sceKernelWaitSema")]
|
||||
[SysAbiExport(Nid = "Zxa0VhQVTsk", ExportName = "sceKernelWaitSema")]
|
||||
public static int Shared(CpuContext ctx) => 0;
|
||||
}
|
||||
""");
|
||||
|
||||
AssertSingle(diagnostics, "SHEM001");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void EveryAttributeOnAMultiAttributeHandlerIsAnalyzed()
|
||||
{
|
||||
var diagnostics = Analyze("""
|
||||
using SharpEmu.HLE;
|
||||
|
||||
public static class Exports
|
||||
{
|
||||
[SysAbiExport(Nid = "Zxa0VhQVTsk", ExportName = "sceKernelWaitSema")]
|
||||
[SysAbiExport(Nid = "not_a_nid")]
|
||||
public static int Shared(CpuContext ctx) => 0;
|
||||
}
|
||||
""");
|
||||
|
||||
AssertSingle(diagnostics, "SHEM002");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void MalformedNidIsReported()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user