cppjieba_rb 0.4.1 → 0.4.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.editorconfig +21 -0
- data/.github/workflows/linting.yml +30 -0
- data/.github/workflows/release.yml +42 -0
- data/.github/workflows/tests.yml +47 -0
- data/.gitignore +1 -0
- data/.rubocop.yml +45 -0
- data/.ruby-version +1 -0
- data/.yamllint +35 -0
- data/CHANGELOG.md +17 -0
- data/Gemfile +11 -0
- data/README.md +5 -5
- data/Rakefile +16 -7
- data/cppjieba_rb.gemspec +46 -33
- data/ext/cppjieba/.github/workflows/cmake.yml +52 -0
- data/ext/cppjieba/.github/workflows/stale-issues.yml +24 -0
- data/ext/cppjieba/.gitmodules +3 -0
- data/ext/cppjieba/{ChangeLog.md → CHANGELOG.md} +50 -1
- data/ext/cppjieba/CMakeLists.txt +11 -14
- data/ext/cppjieba/LICENSE +20 -0
- data/ext/cppjieba/README.md +9 -18
- data/ext/cppjieba/deps/limonp/.github/workflows/cmake.yml +43 -0
- data/ext/cppjieba/deps/limonp/.gitignore +9 -0
- data/ext/cppjieba/deps/limonp/CHANGELOG.md +160 -0
- data/ext/cppjieba/deps/limonp/CMakeLists.txt +61 -0
- data/ext/cppjieba/deps/limonp/LICENSE +20 -0
- data/ext/cppjieba/deps/limonp/README.md +38 -0
- data/ext/cppjieba/deps/limonp/{LocalVector.hpp → include/limonp/LocalVector.hpp} +3 -3
- data/ext/cppjieba/deps/limonp/{Logging.hpp → include/limonp/Logging.hpp} +17 -3
- data/ext/cppjieba/deps/limonp/{StringUtil.hpp → include/limonp/StringUtil.hpp} +31 -10
- data/ext/cppjieba/deps/limonp/test/CMakeLists.txt +8 -0
- data/ext/cppjieba/deps/limonp/test/demo.cpp +40 -0
- data/ext/cppjieba/deps/limonp/test/testdata/1.conf +5 -0
- data/ext/cppjieba/deps/limonp/test/testdata/StdExtension.data +3 -0
- data/ext/cppjieba/deps/limonp/test/testdata/dict.gbk +50 -0
- data/ext/cppjieba/deps/limonp/test/testdata/dict.utf8 +50 -0
- data/ext/cppjieba/deps/limonp/test/testdata/io_testfile +2 -0
- data/ext/cppjieba/deps/limonp/test/testdata/jieba.dict.0.1.utf8 +93 -0
- data/ext/cppjieba/deps/limonp/test/testdata/jieba.dict.0.utf8 +93 -0
- data/ext/cppjieba/deps/limonp/test/testdata/jieba.dict.1.utf8 +67 -0
- data/ext/cppjieba/deps/limonp/test/testdata/jieba.dict.2.utf8 +64 -0
- data/ext/cppjieba/deps/limonp/test/unittest/CMakeLists.txt +30 -0
- data/ext/cppjieba/deps/limonp/test/unittest/TArgvContext.cpp +16 -0
- data/ext/cppjieba/deps/limonp/test/unittest/TCastFloat.cpp +19 -0
- data/ext/cppjieba/deps/limonp/test/unittest/TClosure.cpp +85 -0
- data/ext/cppjieba/deps/limonp/test/unittest/TColorPrint.cpp +20 -0
- data/ext/cppjieba/deps/limonp/test/unittest/TConfig.cpp +17 -0
- data/ext/cppjieba/deps/limonp/test/unittest/TLocalVector.cpp +41 -0
- data/ext/cppjieba/deps/limonp/test/unittest/TLogging.cpp +12 -0
- data/ext/cppjieba/deps/limonp/test/unittest/TStdExtension.cpp +95 -0
- data/ext/cppjieba/deps/limonp/test/unittest/TStringUtil.cpp +183 -0
- data/ext/cppjieba/include/cppjieba/DictTrie.hpp +9 -0
- data/ext/cppjieba/include/cppjieba/Jieba.hpp +4 -0
- data/ext/cppjieba/include/cppjieba/Trie.hpp +27 -1
- data/ext/cppjieba/test/CMakeLists.txt +4 -3
- data/ext/cppjieba/test/unittest/CMakeLists.txt +16 -7
- data/ext/cppjieba_rb/extconf.rb +11 -6
- data/ext/cppjieba_rb/internal.cc +1 -1
- data/lib/cppjieba_rb/segment.rb +4 -1
- data/lib/cppjieba_rb/version.rb +3 -1
- data/lib/cppjieba_rb.rb +12 -5
- data/test/test_keyword.rb +8 -8
- data/test/test_segment.rb +14 -10
- data/test/test_stop_word_filter.rb +5 -3
- data/test/test_tagging.rb +5 -2
- metadata +63 -140
- data/.travis.yml +0 -30
- data/ext/cppjieba/.travis.yml +0 -21
- data/ext/cppjieba/README_EN.md +0 -115
- data/ext/cppjieba/appveyor.yml +0 -32
- data/ext/cppjieba/deps/CMakeLists.txt +0 -1
- data/ext/cppjieba/deps/gtest/CMakeLists.txt +0 -5
- data/ext/cppjieba/deps/gtest/include/gtest/gtest-death-test.h +0 -283
- data/ext/cppjieba/deps/gtest/include/gtest/gtest-message.h +0 -230
- data/ext/cppjieba/deps/gtest/include/gtest/gtest-param-test.h +0 -1421
- data/ext/cppjieba/deps/gtest/include/gtest/gtest-param-test.h.pump +0 -487
- data/ext/cppjieba/deps/gtest/include/gtest/gtest-printers.h +0 -796
- data/ext/cppjieba/deps/gtest/include/gtest/gtest-spi.h +0 -232
- data/ext/cppjieba/deps/gtest/include/gtest/gtest-test-part.h +0 -176
- data/ext/cppjieba/deps/gtest/include/gtest/gtest-typed-test.h +0 -259
- data/ext/cppjieba/deps/gtest/include/gtest/gtest.h +0 -2155
- data/ext/cppjieba/deps/gtest/include/gtest/gtest_pred_impl.h +0 -358
- data/ext/cppjieba/deps/gtest/include/gtest/gtest_prod.h +0 -58
- data/ext/cppjieba/deps/gtest/include/gtest/internal/gtest-death-test-internal.h +0 -308
- data/ext/cppjieba/deps/gtest/include/gtest/internal/gtest-filepath.h +0 -210
- data/ext/cppjieba/deps/gtest/include/gtest/internal/gtest-internal.h +0 -1226
- data/ext/cppjieba/deps/gtest/include/gtest/internal/gtest-linked_ptr.h +0 -233
- data/ext/cppjieba/deps/gtest/include/gtest/internal/gtest-param-util-generated.h +0 -4822
- data/ext/cppjieba/deps/gtest/include/gtest/internal/gtest-param-util-generated.h.pump +0 -301
- data/ext/cppjieba/deps/gtest/include/gtest/internal/gtest-param-util.h +0 -619
- data/ext/cppjieba/deps/gtest/include/gtest/internal/gtest-port.h +0 -1788
- data/ext/cppjieba/deps/gtest/include/gtest/internal/gtest-string.h +0 -350
- data/ext/cppjieba/deps/gtest/include/gtest/internal/gtest-tuple.h +0 -968
- data/ext/cppjieba/deps/gtest/include/gtest/internal/gtest-tuple.h.pump +0 -336
- data/ext/cppjieba/deps/gtest/include/gtest/internal/gtest-type-util.h +0 -3330
- data/ext/cppjieba/deps/gtest/include/gtest/internal/gtest-type-util.h.pump +0 -296
- data/ext/cppjieba/deps/gtest/src/.deps/gtest-all.Plo +0 -681
- data/ext/cppjieba/deps/gtest/src/.deps/gtest_main.Plo +0 -509
- data/ext/cppjieba/deps/gtest/src/.dirstamp +0 -0
- data/ext/cppjieba/deps/gtest/src/gtest-all.cc +0 -48
- data/ext/cppjieba/deps/gtest/src/gtest-death-test.cc +0 -1234
- data/ext/cppjieba/deps/gtest/src/gtest-filepath.cc +0 -380
- data/ext/cppjieba/deps/gtest/src/gtest-internal-inl.h +0 -1038
- data/ext/cppjieba/deps/gtest/src/gtest-port.cc +0 -746
- data/ext/cppjieba/deps/gtest/src/gtest-printers.cc +0 -356
- data/ext/cppjieba/deps/gtest/src/gtest-test-part.cc +0 -110
- data/ext/cppjieba/deps/gtest/src/gtest-typed-test.cc +0 -110
- data/ext/cppjieba/deps/gtest/src/gtest.cc +0 -4898
- data/ext/cppjieba/deps/limonp/BlockingQueue.hpp +0 -49
- data/ext/cppjieba/deps/limonp/BoundedBlockingQueue.hpp +0 -67
- data/ext/cppjieba/deps/limonp/BoundedQueue.hpp +0 -65
- data/ext/cppjieba/deps/limonp/FileLock.hpp +0 -74
- data/ext/cppjieba/deps/limonp/Md5.hpp +0 -411
- data/ext/cppjieba/deps/limonp/MutexLock.hpp +0 -51
- data/ext/cppjieba/deps/limonp/Thread.hpp +0 -44
- data/ext/cppjieba/deps/limonp/ThreadPool.hpp +0 -86
- data/ext/cppjieba/test/demo.cpp +0 -80
- /data/ext/cppjieba/deps/{gtest/src/.deps/.dirstamp → limonp/.gitmodules} +0 -0
- /data/ext/cppjieba/deps/limonp/{ArgvContext.hpp → include/limonp/ArgvContext.hpp} +0 -0
- /data/ext/cppjieba/deps/limonp/{Closure.hpp → include/limonp/Closure.hpp} +0 -0
- /data/ext/cppjieba/deps/limonp/{Colors.hpp → include/limonp/Colors.hpp} +0 -0
- /data/ext/cppjieba/deps/limonp/{Condition.hpp → include/limonp/Condition.hpp} +0 -0
- /data/ext/cppjieba/deps/limonp/{Config.hpp → include/limonp/Config.hpp} +0 -0
- /data/ext/cppjieba/deps/limonp/{ForcePublic.hpp → include/limonp/ForcePublic.hpp} +0 -0
- /data/ext/cppjieba/deps/limonp/{NonCopyable.hpp → include/limonp/NonCopyable.hpp} +0 -0
- /data/ext/cppjieba/deps/limonp/{StdExtension.hpp → include/limonp/StdExtension.hpp} +0 -0
- /data/ext/cppjieba/deps/{gtest/src/gtest_main.cc → limonp/test/unittest/gtest_main.cpp} +0 -0
@@ -1,301 +0,0 @@
|
|
1
|
-
$$ -*- mode: c++; -*-
|
2
|
-
$var n = 50 $$ Maximum length of Values arguments we want to support.
|
3
|
-
$var maxtuple = 10 $$ Maximum number of Combine arguments we want to support.
|
4
|
-
// Copyright 2008 Google Inc.
|
5
|
-
// All Rights Reserved.
|
6
|
-
//
|
7
|
-
// Redistribution and use in source and binary forms, with or without
|
8
|
-
// modification, are permitted provided that the following conditions are
|
9
|
-
// met:
|
10
|
-
//
|
11
|
-
// * Redistributions of source code must retain the above copyright
|
12
|
-
// notice, this list of conditions and the following disclaimer.
|
13
|
-
// * Redistributions in binary form must reproduce the above
|
14
|
-
// copyright notice, this list of conditions and the following disclaimer
|
15
|
-
// in the documentation and/or other materials provided with the
|
16
|
-
// distribution.
|
17
|
-
// * Neither the name of Google Inc. nor the names of its
|
18
|
-
// contributors may be used to endorse or promote products derived from
|
19
|
-
// this software without specific prior written permission.
|
20
|
-
//
|
21
|
-
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
22
|
-
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
23
|
-
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
24
|
-
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
25
|
-
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
26
|
-
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
27
|
-
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
28
|
-
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
29
|
-
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
30
|
-
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
31
|
-
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
32
|
-
//
|
33
|
-
// Author: vladl@google.com (Vlad Losev)
|
34
|
-
|
35
|
-
// Type and function utilities for implementing parameterized tests.
|
36
|
-
// This file is generated by a SCRIPT. DO NOT EDIT BY HAND!
|
37
|
-
//
|
38
|
-
// Currently Google Test supports at most $n arguments in Values,
|
39
|
-
// and at most $maxtuple arguments in Combine. Please contact
|
40
|
-
// googletestframework@googlegroups.com if you need more.
|
41
|
-
// Please note that the number of arguments to Combine is limited
|
42
|
-
// by the maximum arity of the implementation of tr1::tuple which is
|
43
|
-
// currently set at $maxtuple.
|
44
|
-
|
45
|
-
#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_GENERATED_H_
|
46
|
-
#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_GENERATED_H_
|
47
|
-
|
48
|
-
// scripts/fuse_gtest.py depends on gtest's own header being #included
|
49
|
-
// *unconditionally*. Therefore these #includes cannot be moved
|
50
|
-
// inside #if GTEST_HAS_PARAM_TEST.
|
51
|
-
#include "gtest/internal/gtest-param-util.h"
|
52
|
-
#include "gtest/internal/gtest-port.h"
|
53
|
-
|
54
|
-
#if GTEST_HAS_PARAM_TEST
|
55
|
-
|
56
|
-
namespace testing {
|
57
|
-
|
58
|
-
// Forward declarations of ValuesIn(), which is implemented in
|
59
|
-
// include/gtest/gtest-param-test.h.
|
60
|
-
template <typename ForwardIterator>
|
61
|
-
internal::ParamGenerator<
|
62
|
-
typename ::testing::internal::IteratorTraits<ForwardIterator>::value_type>
|
63
|
-
ValuesIn(ForwardIterator begin, ForwardIterator end);
|
64
|
-
|
65
|
-
template <typename T, size_t N>
|
66
|
-
internal::ParamGenerator<T> ValuesIn(const T (&array)[N]);
|
67
|
-
|
68
|
-
template <class Container>
|
69
|
-
internal::ParamGenerator<typename Container::value_type> ValuesIn(
|
70
|
-
const Container& container);
|
71
|
-
|
72
|
-
namespace internal {
|
73
|
-
|
74
|
-
// Used in the Values() function to provide polymorphic capabilities.
|
75
|
-
template <typename T1>
|
76
|
-
class ValueArray1 {
|
77
|
-
public:
|
78
|
-
explicit ValueArray1(T1 v1) : v1_(v1) {}
|
79
|
-
|
80
|
-
template <typename T>
|
81
|
-
operator ParamGenerator<T>() const { return ValuesIn(&v1_, &v1_ + 1); }
|
82
|
-
|
83
|
-
private:
|
84
|
-
// No implementation - assignment is unsupported.
|
85
|
-
void operator=(const ValueArray1& other);
|
86
|
-
|
87
|
-
const T1 v1_;
|
88
|
-
};
|
89
|
-
|
90
|
-
$range i 2..n
|
91
|
-
$for i [[
|
92
|
-
$range j 1..i
|
93
|
-
|
94
|
-
template <$for j, [[typename T$j]]>
|
95
|
-
class ValueArray$i {
|
96
|
-
public:
|
97
|
-
ValueArray$i($for j, [[T$j v$j]]) : $for j, [[v$(j)_(v$j)]] {}
|
98
|
-
|
99
|
-
template <typename T>
|
100
|
-
operator ParamGenerator<T>() const {
|
101
|
-
const T array[] = {$for j, [[v$(j)_]]};
|
102
|
-
return ValuesIn(array);
|
103
|
-
}
|
104
|
-
|
105
|
-
private:
|
106
|
-
// No implementation - assignment is unsupported.
|
107
|
-
void operator=(const ValueArray$i& other);
|
108
|
-
|
109
|
-
$for j [[
|
110
|
-
|
111
|
-
const T$j v$(j)_;
|
112
|
-
]]
|
113
|
-
|
114
|
-
};
|
115
|
-
|
116
|
-
]]
|
117
|
-
|
118
|
-
# if GTEST_HAS_COMBINE
|
119
|
-
// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
|
120
|
-
//
|
121
|
-
// Generates values from the Cartesian product of values produced
|
122
|
-
// by the argument generators.
|
123
|
-
//
|
124
|
-
$range i 2..maxtuple
|
125
|
-
$for i [[
|
126
|
-
$range j 1..i
|
127
|
-
$range k 2..i
|
128
|
-
|
129
|
-
template <$for j, [[typename T$j]]>
|
130
|
-
class CartesianProductGenerator$i
|
131
|
-
: public ParamGeneratorInterface< ::std::tr1::tuple<$for j, [[T$j]]> > {
|
132
|
-
public:
|
133
|
-
typedef ::std::tr1::tuple<$for j, [[T$j]]> ParamType;
|
134
|
-
|
135
|
-
CartesianProductGenerator$i($for j, [[const ParamGenerator<T$j>& g$j]])
|
136
|
-
: $for j, [[g$(j)_(g$j)]] {}
|
137
|
-
virtual ~CartesianProductGenerator$i() {}
|
138
|
-
|
139
|
-
virtual ParamIteratorInterface<ParamType>* Begin() const {
|
140
|
-
return new Iterator(this, $for j, [[g$(j)_, g$(j)_.begin()]]);
|
141
|
-
}
|
142
|
-
virtual ParamIteratorInterface<ParamType>* End() const {
|
143
|
-
return new Iterator(this, $for j, [[g$(j)_, g$(j)_.end()]]);
|
144
|
-
}
|
145
|
-
|
146
|
-
private:
|
147
|
-
class Iterator : public ParamIteratorInterface<ParamType> {
|
148
|
-
public:
|
149
|
-
Iterator(const ParamGeneratorInterface<ParamType>* base, $for j, [[
|
150
|
-
|
151
|
-
const ParamGenerator<T$j>& g$j,
|
152
|
-
const typename ParamGenerator<T$j>::iterator& current$(j)]])
|
153
|
-
: base_(base),
|
154
|
-
$for j, [[
|
155
|
-
|
156
|
-
begin$(j)_(g$j.begin()), end$(j)_(g$j.end()), current$(j)_(current$j)
|
157
|
-
]] {
|
158
|
-
ComputeCurrentValue();
|
159
|
-
}
|
160
|
-
virtual ~Iterator() {}
|
161
|
-
|
162
|
-
virtual const ParamGeneratorInterface<ParamType>* BaseGenerator() const {
|
163
|
-
return base_;
|
164
|
-
}
|
165
|
-
// Advance should not be called on beyond-of-range iterators
|
166
|
-
// so no component iterators must be beyond end of range, either.
|
167
|
-
virtual void Advance() {
|
168
|
-
assert(!AtEnd());
|
169
|
-
++current$(i)_;
|
170
|
-
|
171
|
-
$for k [[
|
172
|
-
if (current$(i+2-k)_ == end$(i+2-k)_) {
|
173
|
-
current$(i+2-k)_ = begin$(i+2-k)_;
|
174
|
-
++current$(i+2-k-1)_;
|
175
|
-
}
|
176
|
-
|
177
|
-
]]
|
178
|
-
ComputeCurrentValue();
|
179
|
-
}
|
180
|
-
virtual ParamIteratorInterface<ParamType>* Clone() const {
|
181
|
-
return new Iterator(*this);
|
182
|
-
}
|
183
|
-
virtual const ParamType* Current() const { return ¤t_value_; }
|
184
|
-
virtual bool Equals(const ParamIteratorInterface<ParamType>& other) const {
|
185
|
-
// Having the same base generator guarantees that the other
|
186
|
-
// iterator is of the same type and we can downcast.
|
187
|
-
GTEST_CHECK_(BaseGenerator() == other.BaseGenerator())
|
188
|
-
<< "The program attempted to compare iterators "
|
189
|
-
<< "from different generators." << std::endl;
|
190
|
-
const Iterator* typed_other =
|
191
|
-
CheckedDowncastToActualType<const Iterator>(&other);
|
192
|
-
// We must report iterators equal if they both point beyond their
|
193
|
-
// respective ranges. That can happen in a variety of fashions,
|
194
|
-
// so we have to consult AtEnd().
|
195
|
-
return (AtEnd() && typed_other->AtEnd()) ||
|
196
|
-
($for j && [[
|
197
|
-
|
198
|
-
current$(j)_ == typed_other->current$(j)_
|
199
|
-
]]);
|
200
|
-
}
|
201
|
-
|
202
|
-
private:
|
203
|
-
Iterator(const Iterator& other)
|
204
|
-
: base_(other.base_), $for j, [[
|
205
|
-
|
206
|
-
begin$(j)_(other.begin$(j)_),
|
207
|
-
end$(j)_(other.end$(j)_),
|
208
|
-
current$(j)_(other.current$(j)_)
|
209
|
-
]] {
|
210
|
-
ComputeCurrentValue();
|
211
|
-
}
|
212
|
-
|
213
|
-
void ComputeCurrentValue() {
|
214
|
-
if (!AtEnd())
|
215
|
-
current_value_ = ParamType($for j, [[*current$(j)_]]);
|
216
|
-
}
|
217
|
-
bool AtEnd() const {
|
218
|
-
// We must report iterator past the end of the range when either of the
|
219
|
-
// component iterators has reached the end of its range.
|
220
|
-
return
|
221
|
-
$for j || [[
|
222
|
-
|
223
|
-
current$(j)_ == end$(j)_
|
224
|
-
]];
|
225
|
-
}
|
226
|
-
|
227
|
-
// No implementation - assignment is unsupported.
|
228
|
-
void operator=(const Iterator& other);
|
229
|
-
|
230
|
-
const ParamGeneratorInterface<ParamType>* const base_;
|
231
|
-
// begin[i]_ and end[i]_ define the i-th range that Iterator traverses.
|
232
|
-
// current[i]_ is the actual traversing iterator.
|
233
|
-
$for j [[
|
234
|
-
|
235
|
-
const typename ParamGenerator<T$j>::iterator begin$(j)_;
|
236
|
-
const typename ParamGenerator<T$j>::iterator end$(j)_;
|
237
|
-
typename ParamGenerator<T$j>::iterator current$(j)_;
|
238
|
-
]]
|
239
|
-
|
240
|
-
ParamType current_value_;
|
241
|
-
}; // class CartesianProductGenerator$i::Iterator
|
242
|
-
|
243
|
-
// No implementation - assignment is unsupported.
|
244
|
-
void operator=(const CartesianProductGenerator$i& other);
|
245
|
-
|
246
|
-
|
247
|
-
$for j [[
|
248
|
-
const ParamGenerator<T$j> g$(j)_;
|
249
|
-
|
250
|
-
]]
|
251
|
-
}; // class CartesianProductGenerator$i
|
252
|
-
|
253
|
-
|
254
|
-
]]
|
255
|
-
|
256
|
-
// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
|
257
|
-
//
|
258
|
-
// Helper classes providing Combine() with polymorphic features. They allow
|
259
|
-
// casting CartesianProductGeneratorN<T> to ParamGenerator<U> if T is
|
260
|
-
// convertible to U.
|
261
|
-
//
|
262
|
-
$range i 2..maxtuple
|
263
|
-
$for i [[
|
264
|
-
$range j 1..i
|
265
|
-
|
266
|
-
template <$for j, [[class Generator$j]]>
|
267
|
-
class CartesianProductHolder$i {
|
268
|
-
public:
|
269
|
-
CartesianProductHolder$i($for j, [[const Generator$j& g$j]])
|
270
|
-
: $for j, [[g$(j)_(g$j)]] {}
|
271
|
-
template <$for j, [[typename T$j]]>
|
272
|
-
operator ParamGenerator< ::std::tr1::tuple<$for j, [[T$j]]> >() const {
|
273
|
-
return ParamGenerator< ::std::tr1::tuple<$for j, [[T$j]]> >(
|
274
|
-
new CartesianProductGenerator$i<$for j, [[T$j]]>(
|
275
|
-
$for j,[[
|
276
|
-
|
277
|
-
static_cast<ParamGenerator<T$j> >(g$(j)_)
|
278
|
-
]]));
|
279
|
-
}
|
280
|
-
|
281
|
-
private:
|
282
|
-
// No implementation - assignment is unsupported.
|
283
|
-
void operator=(const CartesianProductHolder$i& other);
|
284
|
-
|
285
|
-
|
286
|
-
$for j [[
|
287
|
-
const Generator$j g$(j)_;
|
288
|
-
|
289
|
-
]]
|
290
|
-
}; // class CartesianProductHolder$i
|
291
|
-
|
292
|
-
]]
|
293
|
-
|
294
|
-
# endif // GTEST_HAS_COMBINE
|
295
|
-
|
296
|
-
} // namespace internal
|
297
|
-
} // namespace testing
|
298
|
-
|
299
|
-
#endif // GTEST_HAS_PARAM_TEST
|
300
|
-
|
301
|
-
#endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_GENERATED_H_
|