Revision 1176

branches/threaded2merge/tests/threads/mforest/admodel.dep (revision 1176)
1 1
3  3
2 2
 222.6430573 0 0
3
 0 77.64074269 0
4
 0 0 10.80075183
5
tau  1
6
nu  1
7
sigma  1
branches/threaded2merge/tests/threads/msimple/GNUmakefile (revision 1176)
1 1
GTEST_DIR=../../googletest-read-only
2 2

  
3
all: clean tests_msimple
3
all: tests_msimple
4 4

  
5
msimple: msimple.tpl
5
msimple.cpp: msimple.tpl
6 6
	CXXFLAGS=-pthread LDFLAGS=-pthread ../../../admb -g msimple
7
	-./msimple
8 7

  
9
tests_msimple: msimple tests_msimple.cpp
8
tests_msimple: msimple.cpp tests_msimple.cpp
10 9
	cp $(GTEST_DIR)/gtest-all.o .
11 10
	CXXFLAGS="-pthread -I$(GTEST_DIR)/include" LDFLAGS=-pthread ../../../admb -g tests_msimple.cpp main.cpp gtest-all.o
11

  
12
run:
12 13
	-./tests_msimple
13 14

  
14 15
clean:
branches/threaded2merge/tests/threads/msimple/tests_msimple.cpp (revision 1176)
6 6
#define main msimple_main
7 7
#include "msimple.cpp"
8 8

  
9
extern "C" {
10
  void test_ad_boundf(int i)
11
  {
12
    throw i;
13
  }
14
}
15

  
9 16
TEST_F(tests_msimple, msimple_main)
10 17
{
11 18
  int argc = 1;
12 19
  char* argv[] = {"msimple"};
13 20
  msimple_main(argc, argv);
14 21
}
22
TEST_F(tests_msimple, msimple_main_test_for_cleanups_files)
23
{
24
  int argc = 1;
25
  char* argv[] = {"msimple"};
26
  msimple_main(argc, argv);
27
  msimple_main(argc, argv);
28
}
29
TEST_F(tests_msimple, msimple_main_contents)
30
{
31
  int argc = 1;
32
  char* argv[] = {"msimple"};
33
  //msimple_main(argc, argv);
34
  ad_set_new_handler();
35
  ad_exit=&test_ad_boundf;
36
  gradient_structure::set_NO_DERIVATIVES();
37
  gradient_structure::set_YES_SAVE_VARIABLES_VALUES();
38
  if (!arrmblsize) arrmblsize=15000000;
39
  try
40
  {
41
    model_parameters mp(arrmblsize,argc,argv);
42
    mp.iprint=10;
43
    mp.preliminary_calculations();
44
    mp.computations(argc,argv);
45
  } 
46
  catch (int i)
47
  {
48
    FAIL();
49
  }
50
}
51
TEST_F(tests_msimple, msimple_main_model_parameters)
52
{
53
  int argc = 1;
54
  char* argv[] = {"msimple"};
55
  ad_set_new_handler();
56
  ad_exit=&test_ad_boundf;
57
  gradient_structure::set_NO_DERIVATIVES();
58
  gradient_structure::set_YES_SAVE_VARIABLES_VALUES();
59
  if (!arrmblsize) arrmblsize=15000000;
60
  try
61
  {
62
    model_parameters mp(arrmblsize,argc,argv);
63
  } 
64
  catch (int i)
65
  {
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff