Bug 1126295 - Move TestAtoms.cpp to gtest and enable it; r=froydnj

This commit is contained in:
Ehsan Akhgari 2015-01-27 09:28:45 -05:00
parent 1c2be45c35
commit 8fa1e0b040
5 changed files with 181 additions and 249 deletions

View File

@ -1,110 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef utfstrings_h__
#define utfstrings_h__
struct UTFStringsStringPair
{
char16_t m16[16];
char m8[16];
};
static const UTFStringsStringPair ValidStrings[] =
{
{ { 'a', 'b', 'c', 'd' },
{ 'a', 'b', 'c', 'd' } },
{ { '1', '2', '3', '4' },
{ '1', '2', '3', '4' } },
{ { 0x7F, 'A', 0x80, 'B', 0x101, 0x200 },
{ 0x7F, 'A', 0xC2, 0x80, 'B', 0xC4, 0x81, 0xC8, 0x80 } },
{ { 0x7FF, 0x800, 0x1000 },
{ 0xDF, 0xBF, 0xE0, 0xA0, 0x80, 0xE1, 0x80, 0x80 } },
{ { 0xD7FF, 0xE000, 0xF00F, 'A', 0xFFF0 },
{ 0xED, 0x9F, 0xBF, 0xEE, 0x80, 0x80, 0xEF, 0x80, 0x8F, 'A', 0xEF, 0xBF, 0xB0 } },
{ { 0xFFF7, 0xFFFC, 0xFFFD, 0xFFFD },
{ 0xEF, 0xBF, 0xB7, 0xEF, 0xBF, 0xBC, 0xEF, 0xBF, 0xBD, 0xEF, 0xBF, 0xBD } },
{ { 0xD800, 0xDC00, 0xD800, 0xDCFF },
{ 0xF0, 0x90, 0x80, 0x80, 0xF0, 0x90, 0x83, 0xBF } },
{ { 0xDBFF, 0xDFFF, 0xDBB7, 0xDCBA },
{ 0xF4, 0x8F, 0xBF, 0xBF, 0xF3, 0xBD, 0xB2, 0xBA } },
{ { 0xFFFD, 0xFFFF },
{ 0xEF, 0xBF, 0xBD, 0xEF, 0xBF, 0xBF } },
{ { 0xFFFD, 0xFFFE, 0xFFFF },
{ 0xEF, 0xBF, 0xBD, 0xEF, 0xBF, 0xBE, 0xEF, 0xBF, 0xBF } },
};
static const UTFStringsStringPair Invalid16Strings[] =
{
{ { 'a', 'b', 0xD800 },
{ 'a', 'b', 0xEF, 0xBF, 0xBD } },
{ { 0xD8FF, 'b' },
{ 0xEF, 0xBF, 0xBD, 'b' } },
{ { 0xD821 },
{ 0xEF, 0xBF, 0xBD } },
{ { 0xDC21 },
{ 0xEF, 0xBF, 0xBD } },
{ { 0xDC00, 0xD800, 'b' },
{ 0xEF, 0xBF, 0xBD, 0xEF, 0xBF, 0xBD, 'b' } },
{ { 'b', 0xDC00, 0xD800 },
{ 'b', 0xEF, 0xBF, 0xBD, 0xEF, 0xBF, 0xBD } },
{ { 0xDC00, 0xD800 },
{ 0xEF, 0xBF, 0xBD, 0xEF, 0xBF, 0xBD } },
{ { 0xDC00, 0xD800, 0xDC00, 0xD800 },
{ 0xEF, 0xBF, 0xBD, 0xF0, 0x90, 0x80, 0x80, 0xEF, 0xBF, 0xBD } },
{ { 0xDC00, 0xD800, 0xD800, 0xDC00 },
{ 0xEF, 0xBF, 0xBD, 0xEF, 0xBF, 0xBD, 0xF0, 0x90, 0x80, 0x80 } },
};
static const UTFStringsStringPair Invalid8Strings[] =
{
{ { 'a', 0xFFFD, 'b' },
{ 'a', 0xC0, 0x80, 'b' } },
{ { 0xFFFD, 0x80 },
{ 0xC1, 0xBF, 0xC2, 0x80 } },
{ { 0xFFFD },
{ 0xC1, 0xBF } },
{ { 0xFFFD, 'x', 0x0800 },
{ 0xE0, 0x80, 0x80, 'x', 0xE0, 0xA0, 0x80 } },
{ { 0xFFFD, 'x', 0xFFFD },
{ 0xF0, 0x80, 0x80, 0x80, 'x', 0xF0, 0x80, 0x8F, 0x80 } },
{ { 0xFFFD, 0xFFFD },
{ 0xF4, 0x90, 0x80, 0x80, 0xF7, 0xBF, 0xBF, 0xBF } },
{ { 0xFFFD, 'x', 0xD800, 0xDC00, 0xFFFD },
{ 0xF0, 0x8F, 0xBF, 0xBF, 'x', 0xF0, 0x90, 0x80, 0x80, 0xF0, 0x8F, 0xBF, 0xBF } },
{ { 0xFFFD, 'x', 0xFFFD },
{ 0xF8, 0x80, 0x80, 0x80, 0x80, 'x', 0xF8, 0x88, 0x80, 0x80, 0x80 } },
{ { 0xFFFD, 0xFFFD },
{ 0xFB, 0xBF, 0xBF, 0xBF, 0xBF, 0xFC, 0xA0, 0x80, 0x80, 0x80, 0x80 } },
{ { 0xFFFD, 0xFFFD },
{ 0xFC, 0x80, 0x80, 0x80, 0x80, 0x80, 0xFD, 0xBF, 0xBF, 0xBF, 0xBF, 0xBF } },
};
// Don't use this array in debug builds as that intentionally asserts.
#ifndef DEBUG
static const char Malformed8Strings[][16] =
{
{ 0x80 },
{ 'a', 0xC8, 'c' },
{ 'a', 0xC0 },
{ 'a', 0xE8, 'c' },
{ 'a', 0xE8, 0x80, 'c' },
{ 'a', 0xE8, 0x80 },
{ 0xE8, 0x7F, 0x80 },
{ 'a', 0xE8, 0xE8, 0x80 },
{ 'a', 0xF4 },
{ 'a', 0xF4, 0x80, 0x80, 'c', 'c' },
{ 'a', 0xF4, 0x80, 'x', 0x80 },
{ 0xF4, 0x80, 0x80, 0x80, 0x80 },
{ 'a', 0xFA, 'c' },
{ 'a', 0xFA, 0x80, 0x80, 0x7F, 0x80, 'c' },
{ 'a', 0xFA, 0x80, 0x80, 0x80, 0x80, 0x80, 'c' },
{ 'a', 0xFD },
{ 'a', 0xFD, 0x80, 0x80, 0x80, 0x80, 'c' },
{ 'a', 0xFD, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80 },
{ 'a', 0xFC, 0x80, 0x80, 0x40, 0x80, 0x80, 'c' },
};
#endif
#endif

View File

@ -11,98 +11,85 @@
#include "nsIServiceManager.h"
#include "nsStaticAtom.h"
#include "gtest/gtest.h"
using namespace mozilla;
namespace TestAtoms {
bool
test_basic()
TEST(Atoms, Basic)
{
for (unsigned int i = 0; i < ArrayLength(ValidStrings); ++i) {
nsDependentString str16(ValidStrings[i].m16);
nsDependentCString str8(ValidStrings[i].m8);
nsCOMPtr<nsIAtom> atom = do_GetAtom(str16);
if (!atom->Equals(str16) || !atom->EqualsUTF8(str8))
return false;
EXPECT_TRUE(atom->Equals(str16));
EXPECT_TRUE(atom->EqualsUTF8(str8));
nsString tmp16;
nsCString tmp8;
atom->ToString(tmp16);
atom->ToUTF8String(tmp8);
if (!str16.Equals(tmp16) || !str8.Equals(tmp8))
return false;
EXPECT_TRUE(str16.Equals(tmp16));
EXPECT_TRUE(str8.Equals(tmp8));
if (!nsDependentString(atom->GetUTF16String()).Equals(str16))
return false;
EXPECT_TRUE(nsDependentString(atom->GetUTF16String()).Equals(str16));
if (!nsAtomString(atom).Equals(str16) ||
!nsDependentAtomString(atom).Equals(str16) ||
!nsAtomCString(atom).Equals(str8))
return false;
EXPECT_TRUE(nsAtomString(atom).Equals(str16));
EXPECT_TRUE(nsDependentAtomString(atom).Equals(str16));
EXPECT_TRUE(nsAtomCString(atom).Equals(str8));
}
return true;
}
bool
test_16vs8()
TEST(Atoms, 16vs8)
{
for (unsigned int i = 0; i < ArrayLength(ValidStrings); ++i) {
nsCOMPtr<nsIAtom> atom16 = do_GetAtom(ValidStrings[i].m16);
nsCOMPtr<nsIAtom> atom8 = do_GetAtom(ValidStrings[i].m8);
if (atom16 != atom8)
return false;
EXPECT_EQ(atom16, atom8);
}
return true;
}
bool
test_buffersharing()
TEST(Atoms, BufferSharing)
{
nsString unique;
unique.AssignLiteral("this is a unique string !@#$");
nsCOMPtr<nsIAtom> atom = do_GetAtom(unique);
return unique.get() == atom->GetUTF16String();
EXPECT_EQ(unique.get(), atom->GetUTF16String());
}
bool
test_null()
TEST(Atoms, NUll)
{
nsAutoString str(NS_LITERAL_STRING("string with a \0 char"));
nsDependentString strCut(str.get());
if (str.Equals(strCut))
return false;
EXPECT_FALSE(str.Equals(strCut));
nsCOMPtr<nsIAtom> atomCut = do_GetAtom(strCut);
nsCOMPtr<nsIAtom> atom = do_GetAtom(str);
return atom->GetLength() == str.Length() &&
atom->Equals(str) &&
atom->EqualsUTF8(NS_ConvertUTF16toUTF8(str)) &&
atom != atomCut &&
atomCut->Equals(strCut);
EXPECT_EQ(atom->GetLength(), str.Length());
EXPECT_TRUE(atom->Equals(str));
EXPECT_TRUE(atom->EqualsUTF8(NS_ConvertUTF16toUTF8(str)));
EXPECT_NE(atom, atomCut);
EXPECT_TRUE(atomCut->Equals(strCut));
}
bool
test_invalid()
TEST(Atoms, Invalid)
{
for (unsigned int i = 0; i < ArrayLength(Invalid16Strings); ++i) {
nsrefcnt count = NS_GetNumberOfAtoms();
{
nsCOMPtr<nsIAtom> atom16 = do_GetAtom(Invalid16Strings[i].m16);
if (!atom16->Equals(nsDependentString(Invalid16Strings[i].m16)))
return false;
EXPECT_TRUE(atom16->Equals(nsDependentString(Invalid16Strings[i].m16)));
}
if (count != NS_GetNumberOfAtoms())
return false;
EXPECT_EQ(count, NS_GetNumberOfAtoms());
}
for (unsigned int i = 0; i < ArrayLength(Invalid8Strings); ++i) {
@ -111,13 +98,11 @@ test_invalid()
{
nsCOMPtr<nsIAtom> atom8 = do_GetAtom(Invalid8Strings[i].m8);
nsCOMPtr<nsIAtom> atom16 = do_GetAtom(Invalid8Strings[i].m16);
if (atom16 != atom8 ||
!atom16->Equals(nsDependentString(Invalid8Strings[i].m16)))
return false;
EXPECT_EQ(atom16, atom8);
EXPECT_TRUE(atom16->Equals(nsDependentString(Invalid8Strings[i].m16)));
}
if (count != NS_GetNumberOfAtoms())
return false;
EXPECT_EQ(count, NS_GetNumberOfAtoms());
}
// Don't run this test in debug builds as that intentionally asserts.
@ -128,13 +113,10 @@ test_invalid()
nsrefcnt count = NS_GetNumberOfAtoms();
nsCOMPtr<nsIAtom> atom8 = do_GetAtom(Malformed8Strings[i]);
if (atom8 != emptyAtom ||
count != NS_GetNumberOfAtoms())
return false;
EXPECT_EQ(atom8, emptyAtom);
EXPECT_EQ(count, NS_GetNumberOfAtoms());
}
#endif
return true;
}
#define FIRST_ATOM_STR "first static atom. Hello!"
@ -167,112 +149,62 @@ isStaticAtom(nsIAtom* atom)
(atom->Release() == 1);
}
bool
test_atomtable()
TEST(Atoms, Table)
{
nsrefcnt count = NS_GetNumberOfAtoms();
nsCOMPtr<nsIAtom> thirdNonPerm = do_GetAtom(THIRD_ATOM_STR);
if (isStaticAtom(thirdNonPerm))
return false;
if (!thirdNonPerm || NS_GetNumberOfAtoms() != count + 1)
return false;
nsCOMPtr<nsIAtom> thirdNonPerm = do_GetAtom(THIRD_ATOM_STR);
EXPECT_FALSE(isStaticAtom(thirdNonPerm));
EXPECT_TRUE(thirdNonPerm);
EXPECT_EQ(NS_GetNumberOfAtoms(), count + 1);
NS_RegisterStaticAtoms(sAtoms_info);
return sAtom1 &&
sAtom1->Equals(NS_LITERAL_STRING(FIRST_ATOM_STR)) &&
isStaticAtom(sAtom1) &&
sAtom2 &&
sAtom2->Equals(NS_LITERAL_STRING(SECOND_ATOM_STR)) &&
isStaticAtom(sAtom2) &&
sAtom3 &&
sAtom3->Equals(NS_LITERAL_STRING(THIRD_ATOM_STR)) &&
isStaticAtom(sAtom3) &&
NS_GetNumberOfAtoms() == count + 3 &&
thirdNonPerm == sAtom3;
EXPECT_TRUE(sAtom1);
EXPECT_TRUE(sAtom1->Equals(NS_LITERAL_STRING(FIRST_ATOM_STR)));
EXPECT_TRUE(isStaticAtom(sAtom1));
EXPECT_TRUE(sAtom2);
EXPECT_TRUE(sAtom2->Equals(NS_LITERAL_STRING(SECOND_ATOM_STR)));
EXPECT_TRUE(isStaticAtom(sAtom2));
EXPECT_TRUE(sAtom3);
EXPECT_TRUE(sAtom3->Equals(NS_LITERAL_STRING(THIRD_ATOM_STR)));
EXPECT_TRUE(isStaticAtom(sAtom3));
EXPECT_EQ(NS_GetNumberOfAtoms(), count + 3);
EXPECT_EQ(thirdNonPerm, sAtom3);
}
#define FIRST_PERM_ATOM_STR "first permanent atom. Hello!"
#define SECOND_PERM_ATOM_STR "second permanent atom. @World!"
bool
test_permanent()
TEST(Atoms, Permanent)
{
nsrefcnt count = NS_GetNumberOfAtoms();
{
nsCOMPtr<nsIAtom> first = do_GetAtom(FIRST_PERM_ATOM_STR);
if (!first->Equals(NS_LITERAL_STRING(FIRST_PERM_ATOM_STR)) ||
isStaticAtom(first))
return false;
EXPECT_TRUE(first->Equals(NS_LITERAL_STRING(FIRST_PERM_ATOM_STR)));
EXPECT_FALSE(isStaticAtom(first));
nsCOMPtr<nsIAtom> first_p =
NS_NewPermanentAtom(NS_LITERAL_STRING(FIRST_PERM_ATOM_STR));
if (!first_p->Equals(NS_LITERAL_STRING(FIRST_PERM_ATOM_STR)) ||
!isStaticAtom(first_p) ||
first != first_p)
return false;
EXPECT_TRUE(first_p->Equals(NS_LITERAL_STRING(FIRST_PERM_ATOM_STR)));
EXPECT_TRUE(isStaticAtom(first_p));
EXPECT_EQ(first, first_p);
nsCOMPtr<nsIAtom> second_p =
NS_NewPermanentAtom(NS_LITERAL_STRING(SECOND_PERM_ATOM_STR));
if (!second_p->Equals(NS_LITERAL_STRING(SECOND_PERM_ATOM_STR)) ||
!isStaticAtom(second_p))
return false;
EXPECT_TRUE(second_p->Equals(NS_LITERAL_STRING(SECOND_PERM_ATOM_STR)));
EXPECT_TRUE(isStaticAtom(second_p));
nsCOMPtr<nsIAtom> second = do_GetAtom(SECOND_PERM_ATOM_STR);
if (!second->Equals(NS_LITERAL_STRING(SECOND_PERM_ATOM_STR)) ||
!isStaticAtom(second) ||
second != second_p)
return false;
EXPECT_TRUE(second->Equals(NS_LITERAL_STRING(SECOND_PERM_ATOM_STR)));
EXPECT_TRUE(isStaticAtom(second));
EXPECT_EQ(second, second_p);
}
return NS_GetNumberOfAtoms() == count + 2;
EXPECT_EQ(NS_GetNumberOfAtoms(), count + 2);
}
typedef bool (*TestFunc)();
static const struct Test
{
const char* name;
TestFunc func;
}
tests[] =
{
{ "test_basic", test_basic },
{ "test_16vs8", test_16vs8 },
{ "test_buffersharing", test_buffersharing },
{ "test_null", test_null },
{ "test_invalid", test_invalid },
// FIXME: Bug 577500 TestAtoms fails when run in dist/bin due to
// static atom table already being closed. TestStaticAtoms has similar
// failure.
#if 0
{ "test_atomtable", test_atomtable },
{ "test_permanent", test_permanent },
#endif
{ nullptr, nullptr }
};
}
using namespace TestAtoms;
int main()
{
{
nsCOMPtr<nsIServiceManager> servMan;
NS_InitXPCOM2(getter_AddRefs(servMan), nullptr, nullptr);
for (const Test* t = tests; t->name != nullptr; ++t)
{
printf("%25s : %s\n", t->name, t->func() ? "SUCCESS" : "FAILURE <--");
}
}
NS_ShutdownXPCOM(nullptr);
return 0;
}

View File

@ -0,0 +1,110 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef utfstrings_h__
#define utfstrings_h__
struct UTFStringsStringPair
{
char16_t m16[16];
char m8[16];
};
static const UTFStringsStringPair ValidStrings[] =
{
{ { 'a', 'b', 'c', 'd' },
{ 'a', 'b', 'c', 'd' } },
{ { '1', '2', '3', '4' },
{ '1', '2', '3', '4' } },
{ { 0x7F, 'A', 0x80, 'B', 0x101, 0x200 },
{ 0x7F, 'A', char(0xC2), char(0x80), 'B', char(0xC4), char(0x81), char(0xC8), char(0x80) } },
{ { 0x7FF, 0x800, 0x1000 },
{ char(0xDF), char(0xBF), char(0xE0), char(0xA0), char(0x80), char(0xE1), char(0x80), char(0x80) } },
{ { 0xD7FF, 0xE000, 0xF00F, 'A', 0xFFF0 },
{ char(0xED), char(0x9F), char(0xBF), char(0xEE), char(0x80), char(0x80), char(0xEF), char(0x80), char(0x8F), 'A', char(0xEF), char(0xBF), char(0xB0) } },
{ { 0xFFF7, 0xFFFC, 0xFFFD, 0xFFFD },
{ char(0xEF), char(0xBF), char(0xB7), char(0xEF), char(0xBF), char(0xBC), char(0xEF), char(0xBF), char(0xBD), char(0xEF), char(0xBF), char(0xBD) } },
{ { 0xD800, 0xDC00, 0xD800, 0xDCFF },
{ char(0xF0), char(0x90), char(0x80), char(0x80), char(0xF0), char(0x90), char(0x83), char(0xBF) } },
{ { 0xDBFF, 0xDFFF, 0xDBB7, 0xDCBA },
{ char(0xF4), char(0x8F), char(0xBF), char(0xBF), char(0xF3), char(0xBD), char(0xB2), char(0xBA) } },
{ { 0xFFFD, 0xFFFF },
{ char(0xEF), char(0xBF), char(0xBD), char(0xEF), char(0xBF), char(0xBF) } },
{ { 0xFFFD, 0xFFFE, 0xFFFF },
{ char(0xEF), char(0xBF), char(0xBD), char(0xEF), char(0xBF), char(0xBE), char(0xEF), char(0xBF), char(0xBF) } },
};
static const UTFStringsStringPair Invalid16Strings[] =
{
{ { 'a', 'b', 0xD800 },
{ 'a', 'b', char(0xEF), char(0xBF), char(0xBD) } },
{ { 0xD8FF, 'b' },
{ char(0xEF), char(0xBF), char(0xBD), 'b' } },
{ { 0xD821 },
{ char(0xEF), char(0xBF), char(0xBD) } },
{ { 0xDC21 },
{ char(0xEF), char(0xBF), char(0xBD) } },
{ { 0xDC00, 0xD800, 'b' },
{ char(0xEF), char(0xBF), char(0xBD), char(0xEF), char(0xBF), char(0xBD), 'b' } },
{ { 'b', 0xDC00, 0xD800 },
{ 'b', char(0xEF), char(0xBF), char(0xBD), char(0xEF), char(0xBF), char(0xBD) } },
{ { 0xDC00, 0xD800 },
{ char(0xEF), char(0xBF), char(0xBD), char(0xEF), char(0xBF), char(0xBD) } },
{ { 0xDC00, 0xD800, 0xDC00, 0xD800 },
{ char(0xEF), char(0xBF), char(0xBD), char(0xF0), char(0x90), char(0x80), char(0x80), char(0xEF), char(0xBF), char(0xBD) } },
{ { 0xDC00, 0xD800, 0xD800, 0xDC00 },
{ char(0xEF), char(0xBF), char(0xBD), char(0xEF), char(0xBF), char(0xBD), char(0xF0), char(0x90), char(0x80), char(0x80) } },
};
static const UTFStringsStringPair Invalid8Strings[] =
{
{ { 'a', 0xFFFD, 'b' },
{ 'a', char(0xC0), char(0x80), 'b' } },
{ { 0xFFFD, 0x80 },
{ char(0xC1), char(0xBF), char(0xC2), char(0x80) } },
{ { 0xFFFD },
{ char(0xC1), char(0xBF) } },
{ { 0xFFFD, 'x', 0x0800 },
{ char(0xE0), char(0x80), char(0x80), 'x', char(0xE0), char(0xA0), char(0x80) } },
{ { 0xFFFD, 'x', 0xFFFD },
{ char(0xF0), char(0x80), char(0x80), char(0x80), 'x', char(0xF0), char(0x80), char(0x8F), char(0x80) } },
{ { 0xFFFD, 0xFFFD },
{ char(0xF4), char(0x90), char(0x80), char(0x80), char(0xF7), char(0xBF), char(0xBF), char(0xBF) } },
{ { 0xFFFD, 'x', 0xD800, 0xDC00, 0xFFFD },
{ char(0xF0), char(0x8F), char(0xBF), char(0xBF), 'x', char(0xF0), char(0x90), char(0x80), char(0x80), char(0xF0), char(0x8F), char(0xBF), char(0xBF) } },
{ { 0xFFFD, 'x', 0xFFFD },
{ char(0xF8), char(0x80), char(0x80), char(0x80), char(0x80), 'x', char(0xF8), char(0x88), char(0x80), char(0x80), char(0x80) } },
{ { 0xFFFD, 0xFFFD },
{ char(0xFB), char(0xBF), char(0xBF), char(0xBF), char(0xBF), char(0xFC), char(0xA0), char(0x80), char(0x80), char(0x80), char(0x80) } },
{ { 0xFFFD, 0xFFFD },
{ char(0xFC), char(0x80), char(0x80), char(0x80), char(0x80), char(0x80), char(0xFD), char(0xBF), char(0xBF), char(0xBF), char(0xBF), char(0xBF) } },
};
// Don't use this array in debug builds as that intentionally asserts.
#ifndef DEBUG
static const char Malformed8Strings[][16] =
{
{ char(0x80) },
{ 'a', char(0xC8), 'c' },
{ 'a', char(0xC0) },
{ 'a', char(0xE8), 'c' },
{ 'a', char(0xE8), char(0x80), 'c' },
{ 'a', char(0xE8), char(0x80) },
{ char(0xE8), 0x7F, char(0x80) },
{ 'a', char(0xE8), char(0xE8), char(0x80) },
{ 'a', char(0xF4) },
{ 'a', char(0xF4), char(0x80), char(0x80), 'c', 'c' },
{ 'a', char(0xF4), char(0x80), 'x', char(0x80) },
{ char(0xF4), char(0x80), char(0x80), char(0x80), char(0x80) },
{ 'a', char(0xFA), 'c' },
{ 'a', char(0xFA), char(0x80), char(0x80), 0x7F, char(0x80), 'c' },
{ 'a', char(0xFA), char(0x80), char(0x80), char(0x80), char(0x80), char(0x80), 'c' },
{ 'a', char(0xFD) },
{ 'a', char(0xFD), char(0x80), char(0x80), char(0x80), char(0x80), 'c' },
{ 'a', char(0xFD), char(0x80), char(0x80), char(0x80), char(0x80), char(0x80), char(0x80) },
{ 'a', char(0xFC), char(0x80), char(0x80), 0x40, char(0x80), char(0x80), 'c' },
};
#endif
#endif

View File

@ -5,6 +5,7 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
UNIFIED_SOURCES += [
'TestAtoms.cpp',
'TestCRT.cpp',
'TestEncoding.cpp',
'TestExpirationTracker.cpp',

View File

@ -83,7 +83,6 @@ if CONFIG['MOZ_MEMORY']:
# 'TestThreads',
# 'TestXPIDLString',
# 'TestUTF',
# 'TestAtoms',
#]
# FIXME: bug 577500 TestStaticAtoms fails when run in dist/bin