Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
c738c9fb
Kaydet (Commit)
c738c9fb
authored
Eki 17, 2014
tarafından
David Tardon
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fix comparison
Change-Id: Ia7f65d69c186056527a2beb72a18f4a66e4c6586
üst
afcd04f7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
test_bigint.cxx
tools/qa/cppunit/test_bigint.cxx
+4
-4
No files found.
tools/qa/cppunit/test_bigint.cxx
Dosyayı görüntüle @
c738c9fb
...
@@ -52,7 +52,7 @@ void BigIntTest::testConstructionFromLongLong()
...
@@ -52,7 +52,7 @@ void BigIntTest::testConstructionFromLongLong()
CPPUNIT_ASSERT
(
!
bi
.
IsZero
());
CPPUNIT_ASSERT
(
!
bi
.
IsZero
());
CPPUNIT_ASSERT
(
!
bi
.
IsNeg
());
CPPUNIT_ASSERT
(
!
bi
.
IsNeg
());
CPPUNIT_ASSERT
(
bi
.
IsLong
());
CPPUNIT_ASSERT
(
bi
.
IsLong
());
CPPUNIT_ASSERT_EQUAL
(
42L
,
bi
);
CPPUNIT_ASSERT_EQUAL
(
42L
,
static_cast
<
long
>
(
bi
)
);
}
}
// small negative number
// small negative number
...
@@ -62,7 +62,7 @@ void BigIntTest::testConstructionFromLongLong()
...
@@ -62,7 +62,7 @@ void BigIntTest::testConstructionFromLongLong()
CPPUNIT_ASSERT
(
!
bi
.
IsZero
());
CPPUNIT_ASSERT
(
!
bi
.
IsZero
());
CPPUNIT_ASSERT
(
bi
.
IsNeg
());
CPPUNIT_ASSERT
(
bi
.
IsNeg
());
CPPUNIT_ASSERT
(
bi
.
IsLong
());
CPPUNIT_ASSERT
(
bi
.
IsLong
());
CPPUNIT_ASSERT_EQUAL
(
-
42L
,
bi
);
CPPUNIT_ASSERT_EQUAL
(
-
42L
,
static_cast
<
long
>
(
bi
)
);
}
}
// positive number just fitting to long
// positive number just fitting to long
...
@@ -72,7 +72,7 @@ void BigIntTest::testConstructionFromLongLong()
...
@@ -72,7 +72,7 @@ void BigIntTest::testConstructionFromLongLong()
CPPUNIT_ASSERT
(
!
bi
.
IsZero
());
CPPUNIT_ASSERT
(
!
bi
.
IsZero
());
CPPUNIT_ASSERT
(
!
bi
.
IsNeg
());
CPPUNIT_ASSERT
(
!
bi
.
IsNeg
());
CPPUNIT_ASSERT
(
bi
.
IsLong
());
CPPUNIT_ASSERT
(
bi
.
IsLong
());
CPPUNIT_ASSERT_EQUAL
(
std
::
numeric_limits
<
long
>::
max
(),
bi
);
CPPUNIT_ASSERT_EQUAL
(
std
::
numeric_limits
<
long
>::
max
(),
static_cast
<
long
>
(
bi
)
);
}
}
// negative number just fitting to long
// negative number just fitting to long
...
@@ -82,7 +82,7 @@ void BigIntTest::testConstructionFromLongLong()
...
@@ -82,7 +82,7 @@ void BigIntTest::testConstructionFromLongLong()
CPPUNIT_ASSERT
(
!
bi
.
IsZero
());
CPPUNIT_ASSERT
(
!
bi
.
IsZero
());
CPPUNIT_ASSERT
(
bi
.
IsNeg
());
CPPUNIT_ASSERT
(
bi
.
IsNeg
());
CPPUNIT_ASSERT
(
bi
.
IsLong
());
CPPUNIT_ASSERT
(
bi
.
IsLong
());
CPPUNIT_ASSERT_EQUAL
(
std
::
numeric_limits
<
long
>::
min
(),
bi
);
CPPUNIT_ASSERT_EQUAL
(
std
::
numeric_limits
<
long
>::
min
(),
static_cast
<
long
>
(
bi
)
);
}
}
// positive number not fitting to long
// positive number not fitting to long
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment