Revision 1176 branches/threaded2merge/tests/gtests/test_adthread_manager.cpp

test_adthread_manager.cpp (revision 1176)
3 3
#include <adthread.h>
4 4

  
5 5
class test_adthread_manager: public ::testing::Test {};
6

  
7 6
TEST_F(test_adthread_manager, constructor)
8 7
{
9 8
  adpthread_manager am(1, 1);
10 9
}
10
TEST_F(test_adthread_manager, arr_link_constructor)
11
{
12
  arr_link al;
13
}
14
TEST_F(test_adthread_manager, arr_new)
15
{
16
  double_and_int* dai = arr_new(5);
17
  EXPECT_EQ(sizeof(void*), sizeof(vector_shape));
18
  //EXPECT_EQ(0, dai);
19
}
20

  
21
class test_dfpool: public ::testing::Test {};
22
TEST_F(test_dfpool, constructor)
23
{
24
  dfpool dfp;
25
}
26

  
27
class test_vector_shape_pool: public ::testing::Test {};
28
TEST_F(test_vector_shape_pool, constructor_pointer_size)
29
{
30
  size_t size = sizeof(void*);
31
  vector_shape_pool vsp(size);
32

  
33
  EXPECT_EQ(size, vsp.size);
34
}
35
TEST_F(test_vector_shape_pool, constructor_pointer_size_plus_one)
36
{
37
  size_t size = sizeof(void*);
38
  vector_shape_pool vsp(size + 1);
39

  
40
  EXPECT_EQ(size + 1, vsp.size);
41
}
42
TEST_F(test_vector_shape_pool, constructor_pointer_size_minus_one)
43
{
44
  size_t size = sizeof(void*);
45
  vector_shape_pool vsp(size - 1);
46

  
47
  EXPECT_EQ(size, vsp.size);
48
}

Also available in: Unified diff