зеркало из https://github.com/mozilla/gecko-dev.git
Bug 869685 - Reintroduce long long support in CheckedInt - r=Waldo
This commit is contained in:
Родитель
66bbeccb91
Коммит
b6ecd61d8f
|
@ -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) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче