~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to unittests/global_buffer_test.cc

  • Committer: Andrew Hutchings
  • Date: 2010-10-20 09:34:21 UTC
  • mto: This revision was merged to the branch mainline in revision 1907.
  • Revision ID: andrew@linuxjedi.co.uk-20101020093421-sejhph8r4bwtet0i
Fix global_buffer test

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
 
26
26
TEST(global_buffer, overflow)
27
27
{
28
 
  global_buffer_constraint<uint64_t> test_buffer(1024);
 
28
  drizzled::global_buffer_constraint<uint64_t> test_buffer(1024);
29
29
 
30
30
  ASSERT_TRUE(test_buffer.add(512));
31
31
  ASSERT_TRUE(test_buffer.add(512));
34
34
 
35
35
TEST(global_buffer, subtract)
36
36
{
37
 
  global_buffer_constraint<uint64_t> test_buffer(1024);
 
37
  drizzled::global_buffer_constraint<uint64_t> test_buffer(1024);
38
38
 
39
39
  ASSERT_TRUE(test_buffer.add(1024));
40
40
  ASSERT_TRUE(test_buffer.sub(512));
44
44
 
45
45
TEST(global_buffer, underflow)
46
46
{
47
 
  global_buffer_constraint<uint64_t> test_buffer(1024);
 
47
  drizzled::global_buffer_constraint<uint64_t> test_buffer(1024);
48
48
 
49
49
  ASSERT_TRUE(test_buffer.add(10));
50
50
  ASSERT_FALSE(test_buffer.sub(11));
52
52
 
53
53
TEST(global_buffer, change_max)
54
54
{
55
 
  global_buffer_constraint<uint64_t> test_buffer(1024);
 
55
  drizzled::global_buffer_constraint<uint64_t> test_buffer(1024);
56
56
 
57
57
  test_buffer.setMaxSize(512);
58
58