mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Fixed a bug in the unit tests without JUCE_STRICT_REFCOUNTEDPOINTER
This commit is contained in:
parent
693a66d73d
commit
608f7bc36c
1 changed files with 5 additions and 0 deletions
|
|
@ -82,7 +82,12 @@ public:
|
||||||
expectEquals (derivedObject->getReferenceCount(), 1);
|
expectEquals (derivedObject->getReferenceCount(), 1);
|
||||||
|
|
||||||
baseArray.add (baseObjectPtr);
|
baseArray.add (baseObjectPtr);
|
||||||
|
|
||||||
|
#if JUCE_STRICT_REFCOUNTEDPOINTER
|
||||||
baseArray.add (derivedObjectPtr);
|
baseArray.add (derivedObjectPtr);
|
||||||
|
#else
|
||||||
|
baseArray.add (derivedObjectPtr.get());
|
||||||
|
#endif
|
||||||
|
|
||||||
for (auto o : baseArray)
|
for (auto o : baseArray)
|
||||||
expectEquals (o->getReferenceCount(), 2);
|
expectEquals (o->getReferenceCount(), 2);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue