Add WASI unit tests for the C# API.
This commit is contained in:
24
crates/misc/dotnet/tests/TempFile.cs
Normal file
24
crates/misc/dotnet/tests/TempFile.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
namespace Wasmtime.Tests
|
||||
{
|
||||
internal class TempFile : IDisposable
|
||||
{
|
||||
public TempFile()
|
||||
{
|
||||
Path = System.IO.Path.GetTempFileName();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
if (Path != null)
|
||||
{
|
||||
File.Delete(Path);
|
||||
Path = null;
|
||||
}
|
||||
}
|
||||
|
||||
public string Path { get; private set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user