Revision 1490

trunk/tests/gtests/scalefactor.tpl (revision 1490)
1
DATA_SECTION
2
PARAMETER_SECTION
3
  init_vector x(1,2)
4
 !! x.set_scalefactor(100.);
5
  init_bounded_vector y(1,2,-5.0,5.0)
6
 !! y.set_scalefactor(50.);
7
  random_effects_vector u(1,2);
8
  objective_function_value f;
9
PROCEDURE_SECTION
10
  f=norm2(x-2.0)+norm2(u-1.0)+norm2(y-2.0)+norm2(x-u)+norm2(y-u);
trunk/tests/gtests/test_scalefactor.cpp (revision 1490)
1
#include <gtest/gtest.h>
2
#include <admodel.h>
3
#include <contrib.h>
4
#include <df1b2fun.h>
5
#include <adrndeff.h>
6
#include "scalefactor.htp"
7

  
8
extern "C"  {
9
  void ad_boundf(int i);
10
}
11
extern long int arrmblsize;
12

  
13
class test_scalefactor: public ::testing::Test {};
14

  
15
TEST_F(test_scalefactor, run)
16
{
17
  int scalefactor(int argc, char* argv[]);
18
  //scalefactor(argc, argv);
19
}
20

  
21
TEST_F(test_scalefactor, run2)
22
{
23
  ad_set_new_handler();
24
  ad_exit=&ad_boundf;
25
  gradient_structure::set_NO_DERIVATIVES();
26
  gradient_structure::set_YES_SAVE_VARIABLES_VALUES();
27
#if defined(__GNUDOS__) || defined(DOS386) || defined(__DPMI32__)  || defined(__MSVC32__)
28
  if (!arrmblsize) arrmblsize=150000;
29
#else
30
  if (!arrmblsize) arrmblsize=25000;
31
#endif
32
  int argc = 1;
33
  char* argv[] = { (char*)"./scalefactor" };
34

  
35
  df1b2variable::noallocate=1;
36
  df1b2_parameters mp(arrmblsize,argc,argv);
37
  mp.iprint=10;
38

  
39
  function_minimizer::random_effects_flag=1;
40
  df1b2variable::noallocate=0;
41
  mp.preliminary_calculations();
42
  mp.userfunction();
43

  
44
  //mp.computations(argc,argv);
45
}
trunk/tests/gtests/test_df_file.cpp (revision 1490)
37 37
{
38 38
  ASSERT_NO_THROW(DF_FILE instance(INT_MAX));
39 39
}
40
/*
40 41
TEST_F(test_df_file, instance_INT_MAX_plus_1)
41 42
{
42 43
  ASSERT_NO_THROW(DF_FILE instance(INT_MAX + 1));
43 44
}
44
/*
45 45
TEST_F(test_df_file, allocate_INT_MAX_plus_1)
46 46
{
47 47
  ASSERT_LT(INT_MAX, LONG_MAX);
......
115 115
  buffer.fread(&array[0], 11);
116 116
  ASSERT_STREQ(expected, array);
117 117
}
118
/*
118 119
TEST_F(test_df_file, write_read_ptr)
119 120
{
120 121
  DF_FILE buffer(50);
......
125 126
  //buffer.fread(number);
126 127
  ASSERT_EQ(&expected, number);
127 128
}
129
*/
trunk/tests/gtests/Makefile (revision 1490)
1
GTEST_DIR=../googletest-read-only
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff