~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to unittests/pthread_atomics_test.cc

  • Committer: Brian Aker
  • Date: 2010-09-22 22:29:55 UTC
  • mto: (1787.3.1 drizzle)
  • mto: This revision was merged to the branch mainline in revision 1789.
  • Revision ID: brian@tangent.org-20100922222955-cg1bddv4b72jwe31
Fix enum at being an intefer (which is what PG did, and it saves on
alignment issues).

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