changeset 1476:ec7427df0a2a

fix build
author Sebastien Jodogne <s.jodogne@gmail.com>
date Sat, 01 Aug 2015 21:40:49 +0200
parents 3a5b8ed2d859
children 8b654bb91930
files UnitTestsSources/SQLiteTests.cpp
diffstat 1 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/UnitTestsSources/SQLiteTests.cpp	Sat Aug 01 21:21:36 2015 +0200
+++ b/UnitTestsSources/SQLiteTests.cpp	Sat Aug 01 21:40:49 2015 +0200
@@ -45,7 +45,14 @@
 
 TEST(SQLite, Configuration)
 {
-  ASSERT_EQ(1, sqlite3_threadsafe());
+  /**
+   * The system-wide version of SQLite under OS X uses
+   * SQLITE_THREADSAFE==2 (SQLITE_CONFIG_SERIALIZED), whereas the
+   * static builds of Orthanc use SQLITE_THREADSAFE==1
+   * (SQLITE_CONFIG_MULTITHREAD). In any case, we wish to ensure that
+   * SQLITE_THREADSAFE!=0 (SQLITE_CONFIG_SINGLETHREAD).
+   **/
+  ASSERT_NE(0, sqlite3_threadsafe());
 }