summaryrefslogtreecommitdiffstats
path: root/test/close_to_open_ratio.c
blob: a636186ef9f3742bd7d6316e8cb9c348196982e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <stddef.h>
#include "ts.h"

bool ts_test_close_to_open_ratio( void )
{
    fp_t const x0[] = { 2, 4, 6, 8, 10 };
    fp_t const x1[] = { 3, 5, 7, 9, 11 };
    fp_t const x2[] = { 1, 3, 5, 7, 9 };
    fp_t const x3[] = { 4, 8, 12, 16, 20 };
    fp_t const x4[] = { 1, 1, 1, 1, 1 };
    fp_t const e0[] = { 2, 2, 2, 2, 2 };

    fp_t const * const x[] = { x0, x1, x2, x3, x4 };
    fp_t const * const e[1] = { e0 };

    return ts_test(ts_close_to_open_ratio, ts_close_to_open_ratio_offset, x, e, sizeof( x0 ) / sizeof( *x0 ), (ts_constant_t *)NULL, &ts_close_to_open_ratio_p);
}