Fix the fact that float(int) != float(int(float(int)))

This commit is contained in:
Gael Guennebaud 2015-06-23 14:33:00 +02:00
parent 71523a2e25
commit 18c9d155f3

View File

@ -223,7 +223,7 @@ void fixedSizeMatrixConstruction()
for(int k=0; k<2; ++k) VERIFY(m2(k) == DenseIndex(raw[k]));
for(int k=0; k<2; ++k) VERIFY(a2(k) == DenseIndex(raw[k]));
for(int k=0; k<2; ++k) VERIFY(m3(k) == int(raw[k]));
for(int k=0; k<2; ++k) VERIFY(m4(k) == float(raw[k]));
for(int k=0; k<2; ++k) VERIFY((m4(k)) == Scalar(float(raw[k])));
}
{
Matrix<Scalar,1,1> m(raw), m1(raw[0]), m2( (DenseIndex(raw[0])) ), m3( (int(raw[0])) );