proxygen
MathTest.cpp File Reference
#include <folly/Math.h>
#include <algorithm>
#include <type_traits>
#include <utility>
#include <vector>
#include <glog/logging.h>
#include <folly/Portability.h>
#include <folly/portability/GTest.h>

Go to the source code of this file.

Functions

 TEST (Bits, divTestInt8)
 
 TEST (Bits, divTestInt16)
 
 TEST (Bits, divTestInt32)
 
 TEST (Bits, divTestUint8)
 
 TEST (Bits, divTestUint16)
 
 TEST (Bits, divTestUint32)
 

Function Documentation

TEST ( Bits  ,
divTestInt8   
)

Definition at line 151 of file MathTest.cpp.

151  {
152  runDivTests<int8_t, int8_t, int64_t>();
153  runDivTests<int8_t, uint8_t, int64_t>();
154  runDivTests<int8_t, int16_t, int64_t>();
155  runDivTests<int8_t, uint16_t, int64_t>();
156  runDivTests<int8_t, int32_t, int64_t>();
157  runDivTests<int8_t, uint32_t, int64_t>();
158 #if FOLLY_HAVE_INT128_T
159  runDivTests<int8_t, int64_t, __int128>();
160  runDivTests<int8_t, uint64_t, __int128>();
161 #endif
162 }
TEST ( Bits  ,
divTestInt16   
)

Definition at line 163 of file MathTest.cpp.

163  {
164  runDivTests<int16_t, int8_t, int64_t>();
165  runDivTests<int16_t, uint8_t, int64_t>();
166  runDivTests<int16_t, int16_t, int64_t>();
167  runDivTests<int16_t, uint16_t, int64_t>();
168  runDivTests<int16_t, int32_t, int64_t>();
169  runDivTests<int16_t, uint32_t, int64_t>();
170 #if FOLLY_HAVE_INT128_T
171  runDivTests<int16_t, int64_t, __int128>();
172  runDivTests<int16_t, uint64_t, __int128>();
173 #endif
174 }
TEST ( Bits  ,
divTestInt32   
)

Definition at line 175 of file MathTest.cpp.

References folly::TEST().

175  {
176  runDivTests<int32_t, int8_t, int64_t>();
177  runDivTests<int32_t, uint8_t, int64_t>();
178  runDivTests<int32_t, int16_t, int64_t>();
179  runDivTests<int32_t, uint16_t, int64_t>();
180  runDivTests<int32_t, int32_t, int64_t>();
181  runDivTests<int32_t, uint32_t, int64_t>();
182 #if FOLLY_HAVE_INT128_T
183  runDivTests<int32_t, int64_t, __int128>();
184  runDivTests<int32_t, uint64_t, __int128>();
185 #endif
186 }
TEST ( Bits  ,
divTestUint8   
)

Definition at line 199 of file MathTest.cpp.

199  {
200  runDivTests<uint8_t, int8_t, int64_t>();
201  runDivTests<uint8_t, uint8_t, int64_t>();
202  runDivTests<uint8_t, int16_t, int64_t>();
203  runDivTests<uint8_t, uint16_t, int64_t>();
204  runDivTests<uint8_t, int32_t, int64_t>();
205  runDivTests<uint8_t, uint32_t, int64_t>();
206 #if FOLLY_HAVE_INT128_T
207  runDivTests<uint8_t, int64_t, __int128>();
208  runDivTests<uint8_t, uint64_t, __int128>();
209 #endif
210 }
TEST ( Bits  ,
divTestUint16   
)

Definition at line 211 of file MathTest.cpp.

211  {
212  runDivTests<uint16_t, int8_t, int64_t>();
213  runDivTests<uint16_t, uint8_t, int64_t>();
214  runDivTests<uint16_t, int16_t, int64_t>();
215  runDivTests<uint16_t, uint16_t, int64_t>();
216  runDivTests<uint16_t, int32_t, int64_t>();
217  runDivTests<uint16_t, uint32_t, int64_t>();
218 #if FOLLY_HAVE_INT128_T
219  runDivTests<uint16_t, int64_t, __int128>();
220  runDivTests<uint16_t, uint64_t, __int128>();
221 #endif
222 }
TEST ( Bits  ,
divTestUint32   
)

Definition at line 223 of file MathTest.cpp.

References folly::TEST().

223  {
224  runDivTests<uint32_t, int8_t, int64_t>();
225  runDivTests<uint32_t, uint8_t, int64_t>();
226  runDivTests<uint32_t, int16_t, int64_t>();
227  runDivTests<uint32_t, uint16_t, int64_t>();
228  runDivTests<uint32_t, int32_t, int64_t>();
229  runDivTests<uint32_t, uint32_t, int64_t>();
230 #if FOLLY_HAVE_INT128_T
231  runDivTests<uint32_t, int64_t, __int128>();
232  runDivTests<uint32_t, uint64_t, __int128>();
233 #endif
234 }