Added test for pointer to const object.
git-svn-id: svn://svn.code.sf.net/p/loki-lib/code/trunk@1025 7ec92016-0320-0410-acc4-a06ded1c099a
This commit is contained in:
parent
81b896f459
commit
bd84a726a9
1 changed files with 15 additions and 1 deletions
|
@ -99,6 +99,8 @@ int main ()
|
||||||
{
|
{
|
||||||
std::vector<Thread*> threads;
|
std::vector<Thread*> threads;
|
||||||
|
|
||||||
|
Printf("--------------------------------------------------------------------------------------\n");
|
||||||
|
|
||||||
for(int i=0; i<numThreads; i++)
|
for(int i=0; i<numThreads; i++)
|
||||||
{
|
{
|
||||||
Printf("Creating thread %d\n")(i);
|
Printf("Creating thread %d\n")(i);
|
||||||
|
@ -111,7 +113,18 @@ int main ()
|
||||||
Thread::DeleteThreads(threads);
|
Thread::DeleteThreads(threads);
|
||||||
|
|
||||||
Printf("--------------------------------------------------------------------------------------\n");
|
Printf("--------------------------------------------------------------------------------------\n");
|
||||||
Printf("--------------------------------------------------------------------------------------\n");
|
|
||||||
|
for(int i=0; i<numThreads; i++)
|
||||||
|
{
|
||||||
|
Printf("Creating thread %d\n")(i);
|
||||||
|
threads.push_back(new Thread(RunConstLocked,reinterpret_cast<void*>(i)));
|
||||||
|
}
|
||||||
|
for(int i=0; i<numThreads; i++)
|
||||||
|
threads.at(i)->start();
|
||||||
|
|
||||||
|
Thread::JoinThreads(threads);
|
||||||
|
Thread::DeleteThreads(threads);
|
||||||
|
|
||||||
Printf("--------------------------------------------------------------------------------------\n");
|
Printf("--------------------------------------------------------------------------------------\n");
|
||||||
|
|
||||||
for(int i=0; i<numThreads; i++)
|
for(int i=0; i<numThreads; i++)
|
||||||
|
@ -125,6 +138,7 @@ int main ()
|
||||||
Thread::JoinThreads(threads);
|
Thread::JoinThreads(threads);
|
||||||
Thread::DeleteThreads(threads);
|
Thread::DeleteThreads(threads);
|
||||||
|
|
||||||
|
Printf("--------------------------------------------------------------------------------------\n");
|
||||||
|
|
||||||
// test pair ctor
|
// test pair ctor
|
||||||
volatile A a;
|
volatile A a;
|
||||||
|
|
Loading…
Add table
Reference in a new issue