Skip to content

Commit

Permalink
chg UWP test program to check return code from win32_set_directory calls
Browse files Browse the repository at this point in the history
  • Loading branch information
ericsink committed Feb 4, 2022
1 parent b0598d4 commit 65b9bdf
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions test_nupkgs/device/UWP/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,18 @@ class Program
static int Main()
{
SQLitePCL.Batteries_V2.Init();
SQLitePCL.raw.sqlite3_win32_set_directory(/*data directory type*/1, Windows.Storage.ApplicationData.Current.LocalFolder.Path);
SQLitePCL.raw.sqlite3_win32_set_directory(/*temp directory type*/2, Windows.Storage.ApplicationData.Current.TemporaryFolder.Path);
var rc = Xunit.Run.AllTestsInCurrentAssembly();
int rc;
rc = SQLitePCL.raw.sqlite3_win32_set_directory(/*data directory type*/1, Windows.Storage.ApplicationData.Current.LocalFolder.Path);
if (rc != SQLitePCL.raw.SQLITE_OK)
{
throw new Exception($"ERROR on SET_DIRECTORY 1: {rc}");
}
rc = SQLitePCL.raw.sqlite3_win32_set_directory(/*temp directory type*/2, Windows.Storage.ApplicationData.Current.TemporaryFolder.Path);
if (rc != SQLitePCL.raw.SQLITE_OK)
{
throw new Exception($"ERROR on SET_DIRECTORY 2: {rc}");
}
Xunit.Run.AllTestsInCurrentAssembly();
Console.ReadLine();
return rc;
}
Expand Down

0 comments on commit 65b9bdf

Please sign in to comment.