Statistics
| Revision:

root / trunk / tests / gtests / test_fmm_control.cpp @ 1147

History | View | Annotate | Download (999 Bytes)

1
#include <gtest/gtest.h>
2
#include <fvar.hpp>
3
#include <adstring.hpp>
4

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

    
7
/**
8
 * Tests for errors in "void adstring::to_lower(void)"
9
 */
10
TEST_F(test_fmm_control, constructor)
11
{
12
  fmm_control fc;
13
  EXPECT_EQ(0, fc.noprintx);
14
  EXPECT_EQ(0.0, fc.fringe);
15
  EXPECT_EQ(500, fc.maxfn);
16
  EXPECT_EQ(1, fc.iprint);
17
  EXPECT_EQ(0.0001, fc.crit);
18
  EXPECT_EQ(30, fc.imax);
19
  EXPECT_EQ(0, fc.dfn);
20
  EXPECT_EQ(0, fc.ifn);
21
  EXPECT_EQ(0, fc.iexit);
22
  EXPECT_EQ(0, fc.ialph);
23
  EXPECT_EQ(0, fc.ihflag);
24
  EXPECT_EQ(0, fc.ihang);
25
  EXPECT_EQ(1, fc.scroll_flag);
26
  EXPECT_EQ(0, fc.maxfn_flag);
27
  EXPECT_EQ(0, fc.quit_flag);
28
  EXPECT_EQ(.0000001, fc.min_improve);
29
  EXPECT_EQ(0, fc.ireturn);
30
  EXPECT_EQ(-1, fc.dcheck_flag);
31
  EXPECT_EQ(1, fc.use_control_c);
32
}
33
/**
34
 * Tests to make sure fringe value is copied.
35
 */
36
TEST_F(test_fmm_control, copy_constructor)
37
{
38
  fmm_control source;
39
  source.fringe = 1.0;
40
  fmm_control copy(source);
41
  EXPECT_EQ(1.0, copy.fringe);
42
}