aboutsummaryrefslogtreecommitdiff
path: root/wrappers/dotnet/VNLib.Utils.Cryptography.Noscrypt/tests/LibNoscryptTests.cs
diff options
context:
space:
mode:
Diffstat (limited to 'wrappers/dotnet/VNLib.Utils.Cryptography.Noscrypt/tests/LibNoscryptTests.cs')
-rw-r--r--wrappers/dotnet/VNLib.Utils.Cryptography.Noscrypt/tests/LibNoscryptTests.cs9
1 files changed, 8 insertions, 1 deletions
diff --git a/wrappers/dotnet/VNLib.Utils.Cryptography.Noscrypt/tests/LibNoscryptTests.cs b/wrappers/dotnet/VNLib.Utils.Cryptography.Noscrypt/tests/LibNoscryptTests.cs
index 25f382a..ffa9cb6 100644
--- a/wrappers/dotnet/VNLib.Utils.Cryptography.Noscrypt/tests/LibNoscryptTests.cs
+++ b/wrappers/dotnet/VNLib.Utils.Cryptography.Noscrypt/tests/LibNoscryptTests.cs
@@ -17,6 +17,7 @@ namespace VNLib.Utils.Cryptography.Noscrypt.Tests
{
const string NoscryptLibWinDebug = @"../../../../../../../build/windows/Debug/noscrypt.dll";
+ const string NoscryptLinuxDebug = @"../../../../../../../build/linux/libnoscrypt.so";
//Keys generated using npx noskey package
@@ -36,7 +37,13 @@ namespace VNLib.Utils.Cryptography.Noscrypt.Tests
[TestInitialize]
public void Initialize()
{
- _testLib = NoscryptLibrary.Load(NoscryptLibWinDebug);
+ _testLib = Environment.OSVersion.Platform switch
+ {
+ PlatformID.Win32NT => NoscryptLibrary.Load(NoscryptLibWinDebug),
+ PlatformID.Unix => NoscryptLibrary.Load(NoscryptLinuxDebug),
+ _ => throw new PlatformNotSupportedException()
+ };
+
_testVectors = JsonDocument.Parse(File.ReadAllText(Nip44VectorTestFile));
}