Revision 1659

trunk/tests/gtests/test_df3_two_variable.cpp (revision 1659)
4 4

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

  
7
TEST_F(test_df3_two_variable, constructor)
7
/*
8
TEST_F(test_df3_two_variable, default_constructor)
8 9
{
9 10
  df3_two_variable v;
10 11
  ASSERT_EQ(0, *v.get_u());
......
18 19
  ASSERT_EQ(0, *v.get_u_xyy());
19 20
  ASSERT_EQ(0, *v.get_u_yyy());
20 21
}
22
*/
21 23
TEST_F(test_df3_two_variable, operator_equal_double)
22 24
{
23 25
  df3_two_variable v;
trunk/tests/gtests/main.cpp (revision 1659)
1 1
#include <gtest/gtest.h>
2 2

  
3
extern "C"
4
{
5
  void test_ad_exit(const int exit_code)
6
  {
7
    throw exit_code;
8
  }
9
}
10

  
3 11
int main(int argc, char** argv)
4 12
{
5 13
  ::testing::InitGoogleTest(&argc, argv);
trunk/tests/gtests/test_df_file.cpp (revision 1659)
1 1
#include <gtest/gtest.h>
2 2
#include <fvar.hpp>
3
#include <new>
4
//using std::new;
5 3

  
4
extern "C"
5
{
6
  void test_ad_exit(const int exit_code);
7
}
8

  
6 9
class test_df_file:public ::testing::Test {};
7 10

  
8 11
TEST_F(test_df_file, signs)
......
33 36
  delete [] a;
34 37
  a = 0;
35 38
}
36
TEST_F(test_df_file, instance_INT_MAX)
39
TEST_F(test_df_file, constructor_size)
37 40
{
38
  ASSERT_NO_THROW(DF_FILE instance(INT_MAX));
41
  ASSERT_NO_THROW(DF_FILE df_file(INT_MAX));
39 42
}
40
/*
41
TEST_F(test_df_file, instance_INT_MAX_plus_1)
43
TEST_F(test_df_file, union_sizeof)
42 44
{
43
  ASSERT_NO_THROW(DF_FILE instance(INT_MAX + 1));
45
  DF_FILE df_file(INT_MAX);
46
  ASSERT_EQ(sizeof(df_file.fourb), sizeof(df_file.offset));
44 47
}
48
TEST_F(test_df_file, constructor_INT_MAX_plus_1)
49
{
50
  ad_exit=&test_ad_exit;
51
  ASSERT_ANY_THROW(
52
    DF_FILE df_file(INT_MAX + 1)
53
  );
54
}
45 55
TEST_F(test_df_file, allocate_INT_MAX_plus_1)
46 56
{
47 57
  ASSERT_LT(INT_MAX, LONG_MAX);
......
60 70
  }
61 71
  FAIL();
62 72
}
63
*/
64 73
TEST_F(test_df_file, write_read_int)
65 74
{
66
  DF_FILE buffer(sizeof(int));
75
  size_t sizeofint = sizeof(int);
76
  DF_FILE buffer(sizeofint);
77
  ASSERT_EQ(0, buffer.offset);
78
  ASSERT_EQ(0, buffer.toffset);
79

  
80
  gradient_structure::no_derivatives = 0;
81

  
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff