mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-07-04 20:25:10 +08:00
Fix overflow and make use of long long in c++11 only.
This commit is contained in:
parent
3453b00a1e
commit
7073430946
@ -50,17 +50,20 @@ template<typename MatrixType> void basicStuff(const MatrixType& m)
|
|||||||
VERIFY_IS_APPROX(x, v1[r]);
|
VERIFY_IS_APPROX(x, v1[r]);
|
||||||
|
|
||||||
// test fetching with various index types.
|
// test fetching with various index types.
|
||||||
x = v1(static_cast<char>(r));
|
Index r1 = internal::random<Index>(0, numext::mini(Index(127),rows-1));
|
||||||
x = v1(static_cast<signed char>(r));
|
x = v1(static_cast<char>(r1));
|
||||||
x = v1(static_cast<unsigned char>(r));
|
x = v1(static_cast<signed char>(r1));
|
||||||
x = v1(static_cast<signed short>(r));
|
x = v1(static_cast<unsigned char>(r1));
|
||||||
x = v1(static_cast<unsigned short>(r));
|
x = v1(static_cast<signed short>(r1));
|
||||||
x = v1(static_cast<signed int>(r));
|
x = v1(static_cast<unsigned short>(r1));
|
||||||
x = v1(static_cast<unsigned int>(r));
|
x = v1(static_cast<signed int>(r1));
|
||||||
x = v1(static_cast<signed long>(r));
|
x = v1(static_cast<unsigned int>(r1));
|
||||||
x = v1(static_cast<unsigned long>(r));
|
x = v1(static_cast<signed long>(r1));
|
||||||
x = v1(static_cast<long long int>(r));
|
x = v1(static_cast<unsigned long>(r1));
|
||||||
x = v1(static_cast<unsigned long long int>(r));
|
#if EIGEN_HAS_CXX11
|
||||||
|
x = v1(static_cast<long long int>(r1));
|
||||||
|
x = v1(static_cast<unsigned long long int>(r1));
|
||||||
|
#endif
|
||||||
|
|
||||||
VERIFY_IS_APPROX( v1, v1);
|
VERIFY_IS_APPROX( v1, v1);
|
||||||
VERIFY_IS_NOT_APPROX( v1, 2*v1);
|
VERIFY_IS_NOT_APPROX( v1, 2*v1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user