Skip to content

Commit

Permalink
Code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
yup-bot committed Dec 7, 2024
1 parent 73cad40 commit e67c702
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 30 deletions.
2 changes: 1 addition & 1 deletion modules/juce_core/maths/juce_BigInteger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -874,7 +874,7 @@ bool BigInteger::operator== (const BigInteger& other) const noexcept { return co

bool BigInteger::operator!= (const BigInteger& other) const noexcept { return compare (other) != 0; }

bool BigInteger::operator<(const BigInteger& other) const noexcept { return compare (other) < 0; }
bool BigInteger::operator< (const BigInteger& other) const noexcept { return compare (other) < 0; }

bool BigInteger::operator<= (const BigInteger& other) const noexcept { return compare (other) <= 0; }

Expand Down
2 changes: 1 addition & 1 deletion tests/juce_core/juce_BigInteger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ using namespace juce;

TEST (BigIntegerTests, BasicTests)
{
auto getBigRandom = [](Random& r)
auto getBigRandom = [] (Random& r)
{
BigInteger b;

Expand Down
56 changes: 28 additions & 28 deletions tests/juce_core/juce_ObjCHelpers.mm
Original file line number Diff line number Diff line change
Expand Up @@ -49,40 +49,40 @@

using namespace juce;

TEST (ObjCHelpers, Range)
TEST(ObjCHelpers, Range)
{
constexpr auto start = 10;
constexpr auto length = 20;

const auto juceRange = Range<int>::withStartAndLength(start, length);
const auto nsRange = NSMakeRange(start, length);

EXPECT_TRUE (nsRangeToJuce(nsRange) == juceRange);
EXPECT_TRUE (NSEqualRanges(nsRange, juceRangeToNS(juceRange)));
EXPECT_TRUE(nsRangeToJuce(nsRange) == juceRange);
EXPECT_TRUE(NSEqualRanges(nsRange, juceRangeToNS(juceRange)));
}

TEST (ObjCHelpers, String)
TEST(ObjCHelpers, String)
{
String juceString{"Hello world!"};
NSString* nsString{@"Hello world!"};

EXPECT_TRUE (nsStringToJuce(nsString) == juceString);
EXPECT_TRUE ([nsString isEqualToString:juceStringToNS(juceString)]);
EXPECT_TRUE ([nsString isEqualToString:nsStringLiteral("Hello world!")]);
EXPECT_TRUE(nsStringToJuce(nsString) == juceString);
EXPECT_TRUE([nsString isEqualToString:juceStringToNS(juceString)]);
EXPECT_TRUE([nsString isEqualToString:nsStringLiteral("Hello world!")]);
}

TEST (ObjCHelpers, StringArray)
TEST(ObjCHelpers, StringArray)
{
const StringArray stringArray{"Hello world!", "this", "is", "a", "test"};
NSArray* nsArray
{
@[ @"Hello world!", @"this", @"is", @"a", @"test" ]
};

EXPECT_TRUE ([nsArray isEqualToArray:createNSArrayFromStringArray(stringArray)]);
EXPECT_TRUE([nsArray isEqualToArray:createNSArrayFromStringArray(stringArray)]);
}

TEST (ObjCHelpers, Dictionary)
TEST(ObjCHelpers, Dictionary)
{
DynamicObject::Ptr data{new DynamicObject()};
data->setProperty("integer", 1);
Expand All @@ -94,32 +94,32 @@
data->setProperty("array", array);

const auto* nsDictionary = varToNSDictionary(data.get());
EXPECT_TRUE (nsDictionary != nullptr);
EXPECT_TRUE(nsDictionary != nullptr);

const auto clone = nsDictionaryToVar(nsDictionary);
EXPECT_TRUE (clone.isObject());

EXPECT_TRUE (clone.getProperty("integer", {}).isInt());
EXPECT_TRUE (clone.getProperty("double", {}).isDouble());
EXPECT_TRUE (clone.getProperty("boolean", {}).isBool());
EXPECT_TRUE (clone.getProperty("string", {}).isString());
EXPECT_TRUE (clone.getProperty("array", {}).isArray());

EXPECT_TRUE (clone.getProperty("integer", {}) == var{1});
EXPECT_TRUE (clone.getProperty("double", {}) == var{2.3});
EXPECT_TRUE (clone.getProperty("boolean", {}) == var{true});
EXPECT_TRUE (clone.getProperty("string", {}) == var{"Hello world!"});
EXPECT_TRUE (clone.getProperty("array", {}) == var{array});
EXPECT_TRUE(clone.isObject());

EXPECT_TRUE(clone.getProperty("integer", {}).isInt());
EXPECT_TRUE(clone.getProperty("double", {}).isDouble());
EXPECT_TRUE(clone.getProperty("boolean", {}).isBool());
EXPECT_TRUE(clone.getProperty("string", {}).isString());
EXPECT_TRUE(clone.getProperty("array", {}).isArray());

EXPECT_TRUE(clone.getProperty("integer", {}) == var{1});
EXPECT_TRUE(clone.getProperty("double", {}) == var{2.3});
EXPECT_TRUE(clone.getProperty("boolean", {}) == var{true});
EXPECT_TRUE(clone.getProperty("string", {}) == var{"Hello world!"});
EXPECT_TRUE(clone.getProperty("array", {}) == var{array});
}

TEST (ObjCHelpers, VarToNSDictionaryConvertVoidVariantToEmptyDictionary)
TEST(ObjCHelpers, VarToNSDictionaryConvertVoidVariantToEmptyDictionary)
{
var voidVariant;

const auto* nsDictionary = varToNSDictionary(voidVariant);
EXPECT_TRUE (nsDictionary != nullptr);
EXPECT_TRUE(nsDictionary != nullptr);

const auto result = nsDictionaryToVar(nsDictionary);
EXPECT_TRUE (result.isObject());
EXPECT_TRUE (result.getDynamicObject()->getProperties().isEmpty());
EXPECT_TRUE(result.isObject());
EXPECT_TRUE(result.getDynamicObject()->getProperties().isEmpty());
}

0 comments on commit e67c702

Please sign in to comment.