Coverage Report

Created: 2017-11-12 13:27

/home/liu/buildslave/linux-x64-runtests/build/test/regression/defects.l0.1.tests.c
Line
Count
Source
1
#include "ccv.h"
2
#include "case.h"
3
#include "ccv_case.h"
4
#include "ccv_internal.h"
5
6
/* this file is for all failed cases (a.k.a. bugs) that before 0.1 version */
7
8
TEST_CASE("ccv_filter cannot cover full range when the source is small enough")
9
1
{
10
1
  ccv_dense_matrix_t* x = ccv_dense_matrix_new(20, 14, CCV_32F | CCV_C1, 0, 0);
11
1
  ccv_dense_matrix_t* y = ccv_dense_matrix_new(15, 5, CCV_32F | CCV_C1, 0, 0);
12
1
  int i;
13
76
  for (i = 0; 
i < 15 * 576
;
i++75
)
14
75
    y->data.f32[i] = 1;
15
281
  for (i = 0; 
i < 20 * 14281
;
i++280
)
16
280
    x->data.f32[i] = 1;
17
1
  ccv_dense_matrix_t* d = ccv_dense_matrix_new(20, 14, CCV_32F | CCV_C1, 0, 0);
18
281
  for (i = 0; 
i < 20 * 14281
;
i++280
)
19
280
    d->data.f32[i] = sqrtf(-1.0f);
20
1
  ccv_filter(x, y, &d, 0, CCV_NO_PADDING);
21
1
  
REQUIRE1
(!ccv_any_nan(d), "filter result shouldn't contain any nan value")
;1
22
1
  ccv_matrix_free(d);
23
1
  ccv_matrix_free(y);
24
1
  ccv_matrix_free(x);
25
1
}
26
27
#include "case_main.h"