1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-30 23:28:12 +00:00

Meta+LibHTTP through LibWeb: Make clang-format-10 clean

This commit is contained in:
Ben Wiederhake 2020-09-18 09:49:51 +02:00 committed by Andreas Kling
parent ede5dbd7b3
commit 08f9bc26a6
65 changed files with 297 additions and 273 deletions

View file

@ -25,10 +25,13 @@
*/
#include <AK/TestSuite.h>
#include <math.h>
#define EXPECT_CLOSE(a, b) { EXPECT(fabs(a - b) < 0.000001); }
#define EXPECT_CLOSE(a, b) \
{ \
EXPECT(fabs(a - b) < 0.000001); \
}
TEST_CASE(trig)
{
@ -77,14 +80,14 @@ TEST_CASE(exponents)
};
values values[8] {
{ 1.500000, 4.481626, 2.129246, 2.352379, 0.905148},
{ 20.990000, 1304956710.432035, 652478355.216017, 652478355.216017, 1.000000},
{ 20.010000, 490041186.687082, 245020593.343541, 245020593.343541, 1.000000},
{ 0.000000, 1.000000, 0.000000, 1.000000, 0.000000},
{ 0.010000, 1.010050, 0.010000, 1.000050, 0.010000},
{ -0.010000, 0.990050, -0.010000, 1.000050, -0.010000},
{ -1.000000, 0.367879, -1.175201, 1.543081, -0.761594},
{ -17.000000, 0.000000, -12077476.376788, 12077476.376788, -1.000000},
{ 1.500000, 4.481626, 2.129246, 2.352379, 0.905148 },
{ 20.990000, 1304956710.432035, 652478355.216017, 652478355.216017, 1.000000 },
{ 20.010000, 490041186.687082, 245020593.343541, 245020593.343541, 1.000000 },
{ 0.000000, 1.000000, 0.000000, 1.000000, 0.000000 },
{ 0.010000, 1.010050, 0.010000, 1.000050, 0.010000 },
{ -0.010000, 0.990050, -0.010000, 1.000050, -0.010000 },
{ -1.000000, 0.367879, -1.175201, 1.543081, -0.761594 },
{ -17.000000, 0.000000, -12077476.376788, 12077476.376788, -1.000000 },
};
for (auto& v : values) {
EXPECT_CLOSE(exp(v.x), v.exp);