From 225c2be092fbe6e7464de2046937989f99a419e1 Mon Sep 17 00:00:00 2001 From: vnugent Date: Thu, 22 Aug 2024 21:56:47 -0400 Subject: ci: update and test c# libs for linux --- .../VNLib.Utils.Cryptography.Noscrypt/tests/LibNoscryptTests.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'wrappers/dotnet/VNLib.Utils.Cryptography.Noscrypt') 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)); } -- cgit