1/* -*- Mode: C; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
2
3/**
4 * @copyright 2013 Couchbase, Inc.
5 *
6 * @author Volker Mische <volker@couchbase.com>
7 *
8 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9 * use this file except in compliance with the License. You may obtain a copy of
10 * the License at
11 *
12 *  http://www.apache.org/licenses/LICENSE-2.0
13 *
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17 * License for the specific language governing permissions and limitations under
18 * the License.
19 **/
20
21#ifndef _VIEW_SPATIAL_TESTS_H
22#define _VIEW_SPATIAL_TESTS_H
23
24#include "config.h"
25#include <stdio.h>
26#include <string.h>
27#include <stdlib.h>
28#include <stdbool.h>
29#include "../macros.h"
30#include "../src/views/bitmap.h"
31#include "../src/views/spatial.h"
32
33/* Those functions are normaly static. They are declared here to prevent
34 * compile time warning */
35couchstore_error_t encode_spatial_key(const sized_mbb_t *mbb,
36                                      char *key,
37                                      size_t nkey);
38couchstore_error_t decode_spatial_key(const char *key, sized_mbb_t *mbb);
39couchstore_error_t expand_mbb(sized_mbb_t *original, sized_mbb_t *expander);
40
41
42void test_interleaving(void);
43void test_spatial_scale_factor(void);
44void test_spatial_center(void);
45void test_spatial_scale_point(void);
46void test_set_bit_sized(void);
47void test_encode_spatial_key(void);
48void test_decode_spatial_key(void);
49void test_expand_mbb(void);
50void test_view_spatial_reduce(void);
51
52#endif
53