~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to unittests/pthread_atomics_test.cc

  • Committer: Monty Taylor
  • Date: 2010-06-02 22:35:45 UTC
  • mto: This revision was merged to the branch mainline in revision 1586.
  • Revision ID: mordred@inaugust.com-20100602223545-q8ekf9b40a85nwuf
Rearragned unittests into a single exe because of how we need to link it
(thanks lifeless)
Link with server symbols without needing to build a library.
Added an additional atomics test which tests whatever version of the atomics
lib the running platform would actually use.

Show diffs side-by-side

added added

removed removed

Lines of Context:
106
106
 
107
107
  u235.fetch_and_store(100);
108
108
 
109
 
  ASSERT_FALSE(u235.compare_and_swap(42, 200));
110
 
  ASSERT_TRUE(u235.compare_and_swap(200, 100));
 
109
  EXPECT_EQ(false, u235.compare_and_swap(42, 200));
 
110
  EXPECT_EQ(true, u235.compare_and_swap(200, 100));
111
111
  EXPECT_EQ(200, u235);
112
112
}
113
113