mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-14 19:27:30 +09:00
Remove base conditional code for crash reporter and injector.
This commit is contained in:
parent
87fa26d31e
commit
434f3590e3
131 changed files with 39 additions and 4139 deletions
|
|
@ -80,27 +80,3 @@ TEST(GfxPrefs, Set) {
|
|||
ASSERT_TRUE(gfxPrefs::APZMaxVelocity() == -1.0f);
|
||||
}
|
||||
|
||||
#ifdef MOZ_CRASHREPORTER
|
||||
// Randomly test the function we use in nsExceptionHandler.cpp here:
|
||||
extern bool SimpleNoCLibDtoA(double aValue, char* aBuffer, int aBufferLength);
|
||||
TEST(GfxPrefs, StringUtility)
|
||||
{
|
||||
char testBuffer[64];
|
||||
double testVal[] = {13.4,
|
||||
3324243.42,
|
||||
0.332424342,
|
||||
864.0,
|
||||
86400 * 100000000.0 * 10000000000.0 * 10000000000.0 * 100.0,
|
||||
86400.0 * 366.0 * 100.0 + 14243.44332};
|
||||
for (size_t i=0; i<mozilla::ArrayLength(testVal); i++) {
|
||||
ASSERT_TRUE(SimpleNoCLibDtoA(testVal[i], testBuffer, sizeof(testBuffer)));
|
||||
ASSERT_TRUE(fabs(1.0 - atof(testBuffer)/testVal[i]) < 0.0001);
|
||||
}
|
||||
|
||||
// We do not like negative numbers (random limitation)
|
||||
ASSERT_FALSE(SimpleNoCLibDtoA(-864.0, testBuffer, sizeof(testBuffer)));
|
||||
|
||||
// It won't fit into 32:
|
||||
ASSERT_FALSE(SimpleNoCLibDtoA(testVal[4], testBuffer, sizeof(testBuffer)/2));
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue