aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Taskfile.yaml6
-rw-r--r--wrappers/dotnet/VNLib.Utils.Cryptography.Noscrypt/tests/LibNoscryptTests.cs9
2 files changed, 14 insertions, 1 deletions
diff --git a/Taskfile.yaml b/Taskfile.yaml
index 0af15f3..f66a6f9 100644
--- a/Taskfile.yaml
+++ b/Taskfile.yaml
@@ -54,6 +54,12 @@ tasks:
vars: { BUILD_CONFIG: 'Debug' }
- cmd: cd {{.CMAKE_BUILD_DIR}} && ctest -C Debug --verbose --output-on-failure
+ test-full:
+ desc: '(dotnet required) builds, and tests noscrypt using the .NET library test suite'
+ cmds:
+ - task: test
+ - cmd: dotnet test --logger 'console;verbosity=detailed'
+
compile:
internal: true
cmds:
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));
}