forked from facebook/fbthrift
-
Notifications
You must be signed in to change notification settings - Fork 0
/
traits_test_helpers.h
88 lines (79 loc) · 2.89 KB
/
traits_test_helpers.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
/*
* Copyright 2016-present Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef THRIFT_FATAL_TRAITS_TEST_HELPERS_H
#define THRIFT_FATAL_TRAITS_TEST_HELPERS_H
namespace apache {
namespace thrift {
/**
* Test procedure for `thrift_list_traits` specializations of lists that
* resemble standard containers (say, provide `begin()` and `end()`).
*
* Say there's a custom list type `MyList` for which a specialization of
* `thrift_list_traits` has been provided, simply call this function to test
* such specialization, passing the custom list type as a parameter:
*
* test_thrift_list_traits<MyList>();
*
* @author: Marcelo Juchem <[email protected]>
*/
template <typename T>
void test_thrift_list_traits();
/**
* Test procedure for `thrift_string_traits` specializations of strings that
* resemble standard containers (say, provide `begin()` and `end()`).
*
* Say there's a custom string type `MyString` for which a specialization of
* `thrift_string_traits` has been provided, simply call this function to test
* such specialization, passing the custom string type as a parameter:
*
* test_thrift_string_traits<MyString>();
*
* @author: Marcelo Juchem <[email protected]>
*/
template <typename T>
void test_thrift_string_traits();
/**
* Test procedure for `thrift_set_traits` specializations of sets that
* resemble standard containers (say, provide `begin()` and `end()`).
*
* Say there's a custom set type `MySet` for which a specialization of
* `thrift_set_traits` has been provided, simply call this function to test
* such specialization, passing the custom set type as a parameter:
*
* test_thrift_set_traits<MySet>();
*
* @author: Marcelo Juchem <[email protected]>
*/
template <typename T>
void test_thrift_set_traits();
/**
* Test procedure for `thrift_map_traits` specializations of maps that
* resemble standard containers (say, provide `begin()` and `end()`).
*
* Say there's a custom map type `MyMap` for which a specialization of
* `thrift_map_traits` has been provided, simply call this function to test
* such specialization, passing the custom map type as a parameter:
*
* test_thrift_map_traits<MyMap>();
*
* @author: Marcelo Juchem <[email protected]>
*/
template <typename T>
void test_thrift_map_traits();
} // namespace thrift
} // namespace apache
#include <thrift/lib/cpp2/reflection/internal/traits_test_helpers-inl.h>
#endif // THRIFT_FATAL_TRAITS_TEST_HELPERS_H