Statistics
| Revision:

root / trunk / tests / gtests / test_dvector.cpp @ 1975

History | View | Annotate | Download (463 Bytes)

1
#include <gtest/gtest.h>
2
#include <dvector.h>
3

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

    
9
class test_dvector: public ::testing::Test {};
10

    
11
TEST_F(test_dvector, constructor)
12
{
13
  ad_exit=&test_ad_exit;
14

    
15
  try
16
  {
17
    dvector v(1, 10);
18
    dvector w(0, 1000);
19
    v(0, 1000) = w;
20
  }
21
  catch (const int exit_code)          
22
  {   
23
    const int expected_exit_code = 1;
24
    if (exit_code == expected_exit_code)
25
    {
26
      return;
27
    }
28
  }
29
  FAIL();
30
}