fix(tests/util): disable some tests that do not compile on OSX + Boost + MULTI_THREAD

This commit is contained in:
Leonardo de Moura 2014-06-07 13:13:47 -07:00
parent d827b56777
commit 7847f8a0ca
2 changed files with 3 additions and 5 deletions

View file

@ -193,8 +193,8 @@ static void tst5() {
#define DEFAULT_STEP 5 #define DEFAULT_STEP 5
#endif #endif
#if defined(LEAN_MULTI_THREAD)
static void tst6() { static void tst6() {
#if defined(LEAN_MULTI_THREAD) && !defined(__APPLE__)
int_rb_tree t; int_rb_tree t;
const unsigned SZ = DEFAULT_SZ; const unsigned SZ = DEFAULT_SZ;
for (unsigned i = 0; i < SZ; i++) { for (unsigned i = 0; i < SZ; i++) {
@ -232,8 +232,8 @@ static void tst6() {
} }
} }
} }
}
#endif #endif
}
int main() { int main() {
tst1(); tst1();
@ -241,9 +241,7 @@ int main() {
tst3(); tst3();
tst4(); tst4();
tst5(); tst5();
#if defined(LEAN_MULTI_THREAD)
tst6(); tst6();
#endif
return has_violations() ? 1 : 0; return has_violations() ? 1 : 0;
} }

View file

@ -14,7 +14,7 @@ Author: Leonardo de Moura
#include "util/thread_script_state.h" #include "util/thread_script_state.h"
using namespace lean; using namespace lean;
#if defined(LEAN_MULTI_THREAD) #if defined(LEAN_MULTI_THREAD) && !defined(__APPLE__)
void foo() { void foo() {
LEAN_THREAD_PTR(std::vector<int>) v; LEAN_THREAD_PTR(std::vector<int>) v;
if (!v.get()) v.reset(new std::vector<int>(1024)); if (!v.get()) v.reset(new std::vector<int>(1024));