Bug 869685 - Reintroduce long long support in CheckedInt - r=Waldo

This commit is contained in:
Benoit Jacob 2013-05-08 17:25:03 -04:00
Родитель 66bbeccb91
Коммит b6ecd61d8f
2 изменённых файлов: 13 добавлений и 0 удалений

Просмотреть файл

@ -125,6 +125,13 @@ template<>
struct IsSupportedPass2<unsigned long>
{ static const bool value = true; };
template<>
struct IsSupportedPass2<long long>
{ static const bool value = true; };
template<>
struct IsSupportedPass2<unsigned long long>
{ static const bool value = true; };
/*
* Step 2: some integer-traits kind of stuff.

Просмотреть файл

@ -423,6 +423,8 @@ void test()
typedef unsigned short unsignedShort;
typedef unsigned int unsignedInt;
typedef unsigned long unsignedLong;
typedef long long longLong;
typedef unsigned long long unsignedLongLong;
VERIFY_CONSTRUCTION_FROM_INTEGER_TYPE(char)
VERIFY_CONSTRUCTION_FROM_INTEGER_TYPE(signedChar)
@ -433,6 +435,8 @@ void test()
VERIFY_CONSTRUCTION_FROM_INTEGER_TYPE(unsignedInt)
VERIFY_CONSTRUCTION_FROM_INTEGER_TYPE(long)
VERIFY_CONSTRUCTION_FROM_INTEGER_TYPE(unsignedLong)
VERIFY_CONSTRUCTION_FROM_INTEGER_TYPE(longLong)
VERIFY_CONSTRUCTION_FROM_INTEGER_TYPE(unsignedLongLong)
/* Test increment/decrement operators */
@ -485,6 +489,8 @@ int main()
test<unsigned int>();
test<long>();
test<unsigned long>();
test<long long>();
test<unsigned long long>();
const int MIN_TYPES_TESTED = 9;
if (gIntegerTypesTested < MIN_TYPES_TESTED) {