| @@ -141,6 +141,8 @@ void ThreadedAnalyticsDestination::EventDispatcher::addToQueue (const AnalyticsE | |||||
| eventQueue.push_back (event); | eventQueue.push_back (event); | ||||
| } | } | ||||
| //============================================================================== | |||||
| //============================================================================== | //============================================================================== | ||||
| #if JUCE_UNIT_TESTS | #if JUCE_UNIT_TESTS | ||||
| @@ -213,7 +215,7 @@ namespace DestinationTestHelpers | |||||
| struct ThreadedAnalyticsDestinationTests : public UnitTest | struct ThreadedAnalyticsDestinationTests : public UnitTest | ||||
| { | { | ||||
| ThreadedAnalyticsDestinationTests() | ThreadedAnalyticsDestinationTests() | ||||
| : UnitTest ("ThreadedAnalyticsDestination") | |||||
| : UnitTest ("ThreadedAnalyticsDestination", "Analytics") | |||||
| {} | {} | ||||
| void compareEventQueues (const std::deque<AnalyticsDestination::AnalyticsEvent>& a, | void compareEventQueues (const std::deque<AnalyticsDestination::AnalyticsEvent>& a, | ||||
| @@ -557,8 +557,11 @@ int JUCE_CALLTYPE AudioChannelSet::getAmbisonicOrderForNumChannels (int numChann | |||||
| return (static_cast<float> (ambisonicOrder) == sqrtMinusOne ? ambisonicOrder : -1); | return (static_cast<float> (ambisonicOrder) == sqrtMinusOne ? ambisonicOrder : -1); | ||||
| } | } | ||||
| //============================================================================== | |||||
| //============================================================================== | //============================================================================== | ||||
| #if JUCE_UNIT_TESTS | #if JUCE_UNIT_TESTS | ||||
| class AudioChannelSetUnitTest : public UnitTest | class AudioChannelSetUnitTest : public UnitTest | ||||
| { | { | ||||
| public: | public: | ||||
| @@ -645,6 +648,7 @@ private: | |||||
| }; | }; | ||||
| static AudioChannelSetUnitTest audioChannelSetUnitTest; | static AudioChannelSetUnitTest audioChannelSetUnitTest; | ||||
| #endif | #endif | ||||
| } // namespace juce | } // namespace juce | ||||
| @@ -460,6 +460,7 @@ void AudioDataConverters::deinterleaveSamples (const float* source, float** dest | |||||
| } | } | ||||
| //============================================================================== | |||||
| //============================================================================== | //============================================================================== | ||||
| #if JUCE_UNIT_TESTS | #if JUCE_UNIT_TESTS | ||||
| @@ -1139,6 +1139,7 @@ ScopedNoDenormals::~ScopedNoDenormals() noexcept | |||||
| #endif | #endif | ||||
| } | } | ||||
| //============================================================================== | //============================================================================== | ||||
| //============================================================================== | //============================================================================== | ||||
| #if JUCE_UNIT_TESTS | #if JUCE_UNIT_TESTS | ||||
| @@ -344,6 +344,9 @@ void MidiMessageSequence::createControllerUpdatesForTime (int channelNumber, dou | |||||
| } | } | ||||
| } | } | ||||
| //============================================================================== | |||||
| //============================================================================== | |||||
| #if JUCE_UNIT_TESTS | #if JUCE_UNIT_TESTS | ||||
| struct MidiMessageSequenceTest : public UnitTest | struct MidiMessageSequenceTest : public UnitTest | ||||
| @@ -159,6 +159,7 @@ MidiBuffer MidiRPNGenerator::generate (int midiChannel, | |||||
| return buffer; | return buffer; | ||||
| } | } | ||||
| //============================================================================== | //============================================================================== | ||||
| //============================================================================== | //============================================================================== | ||||
| #if JUCE_UNIT_TESTS | #if JUCE_UNIT_TESTS | ||||
| @@ -371,6 +372,6 @@ private: | |||||
| static MidiRPNGeneratorTests MidiRPNGeneratorUnitTests; | static MidiRPNGeneratorTests MidiRPNGeneratorUnitTests; | ||||
| #endif // JUCE_UNIT_TESTS | |||||
| #endif | |||||
| } // namespace juce | } // namespace juce | ||||
| @@ -791,6 +791,7 @@ void MPEInstrument::releaseAllNotes() | |||||
| notes.clear(); | notes.clear(); | ||||
| } | } | ||||
| //============================================================================== | //============================================================================== | ||||
| //============================================================================== | //============================================================================== | ||||
| #if JUCE_UNIT_TESTS | #if JUCE_UNIT_TESTS | ||||
| @@ -2286,6 +2287,6 @@ private: | |||||
| static MPEInstrumentTests MPEInstrumentUnitTests; | static MPEInstrumentTests MPEInstrumentUnitTests; | ||||
| #endif // JUCE_UNIT_TESTS | |||||
| #endif | |||||
| } // namespace juce | } // namespace juce | ||||
| @@ -106,6 +106,7 @@ MidiBuffer MPEMessages::setZoneLayout (MPEZoneLayout layout) | |||||
| return buffer; | return buffer; | ||||
| } | } | ||||
| //============================================================================== | //============================================================================== | ||||
| //============================================================================== | //============================================================================== | ||||
| #if JUCE_UNIT_TESTS | #if JUCE_UNIT_TESTS | ||||
| @@ -233,6 +234,6 @@ private: | |||||
| static MPEMessagesTests MPEMessagesUnitTests; | static MPEMessagesTests MPEMessagesUnitTests; | ||||
| #endif // JUCE_UNIT_TESTS | |||||
| #endif | |||||
| } // namespace juce | } // namespace juce | ||||
| @@ -84,6 +84,7 @@ bool MPENote::operator!= (const MPENote& other) const noexcept | |||||
| return noteID != other.noteID; | return noteID != other.noteID; | ||||
| } | } | ||||
| //============================================================================== | //============================================================================== | ||||
| //============================================================================== | //============================================================================== | ||||
| #if JUCE_UNIT_TESTS | #if JUCE_UNIT_TESTS | ||||
| @@ -119,6 +120,6 @@ private: | |||||
| static MPENoteTests MPENoteUnitTests; | static MPENoteTests MPENoteUnitTests; | ||||
| #endif // JUCE_UNIT_TESTS | |||||
| #endif | |||||
| } // namespace juce | } // namespace juce | ||||
| @@ -255,6 +255,7 @@ void MPEChannelRemapper::zeroArrays() | |||||
| } | } | ||||
| } | } | ||||
| //============================================================================== | //============================================================================== | ||||
| //============================================================================== | //============================================================================== | ||||
| #if JUCE_UNIT_TESTS | #if JUCE_UNIT_TESTS | ||||
| @@ -475,4 +476,5 @@ struct MPEUtilsUnitTests : public UnitTest | |||||
| static MPEUtilsUnitTests MPEUtilsUnitTests; | static MPEUtilsUnitTests MPEUtilsUnitTests; | ||||
| #endif | #endif | ||||
| } // namespace juce | } // namespace juce | ||||
| @@ -82,6 +82,7 @@ bool MPEValue::operator!= (const MPEValue& other) const noexcept | |||||
| return ! operator== (other); | return ! operator== (other); | ||||
| } | } | ||||
| //============================================================================== | //============================================================================== | ||||
| //============================================================================== | //============================================================================== | ||||
| #if JUCE_UNIT_TESTS | #if JUCE_UNIT_TESTS | ||||
| @@ -165,6 +166,6 @@ private: | |||||
| static MPEValueTests MPEValueUnitTests; | static MPEValueTests MPEValueUnitTests; | ||||
| #endif // JUCE_UNIT_TESTS | |||||
| #endif | |||||
| } // namespace juce | } // namespace juce | ||||
| @@ -205,6 +205,7 @@ void MPEZoneLayout::checkAndLimitZoneParameters (int minValue, int maxValue, | |||||
| } | } | ||||
| } | } | ||||
| //============================================================================== | //============================================================================== | ||||
| //============================================================================== | //============================================================================== | ||||
| #if JUCE_UNIT_TESTS | #if JUCE_UNIT_TESTS | ||||
| @@ -382,6 +383,6 @@ public: | |||||
| static MPEZoneLayoutTests MPEZoneLayoutUnitTests; | static MPEZoneLayoutTests MPEZoneLayoutUnitTests; | ||||
| #endif // JUCE_UNIT_TESTS | |||||
| #endif | |||||
| } // namespace juce | } // namespace juce | ||||
| @@ -157,116 +157,121 @@ void MidiOutput::run() | |||||
| clearAllPendingMessages(); | clearAllPendingMessages(); | ||||
| } | } | ||||
| //============================================================================== | |||||
| //============================================================================== | |||||
| #if JUCE_UNIT_TESTS | #if JUCE_UNIT_TESTS | ||||
| class MidiDevicesUnitTests : public UnitTest | |||||
| { | |||||
| public: | |||||
| MidiDevicesUnitTests() : UnitTest ("MidiInput/MidiOutput", "MIDI/MPE") {} | |||||
| void runTest() override | |||||
| { | |||||
| beginTest ("default device (input)"); | |||||
| { | |||||
| auto devices = MidiInput::getAvailableDevices(); | |||||
| auto defaultDevice = MidiInput::getDefaultDevice(); | |||||
| class MidiDevicesUnitTests : public UnitTest | |||||
| { | |||||
| public: | |||||
| MidiDevicesUnitTests() : UnitTest ("MidiInput/MidiOutput", "MIDI/MPE") {} | |||||
| if (devices.size() == 0) | |||||
| expect (defaultDevice == MidiDeviceInfo()); | |||||
| else | |||||
| expect (devices.contains (defaultDevice)); | |||||
| } | |||||
| void runTest() override | |||||
| { | |||||
| beginTest ("default device (input)"); | |||||
| { | |||||
| auto devices = MidiInput::getAvailableDevices(); | |||||
| auto defaultDevice = MidiInput::getDefaultDevice(); | |||||
| beginTest ("default device (output)"); | |||||
| { | |||||
| auto devices = MidiOutput::getAvailableDevices(); | |||||
| auto defaultDevice = MidiOutput::getDefaultDevice(); | |||||
| if (devices.size() == 0) | |||||
| expect (defaultDevice == MidiDeviceInfo()); | |||||
| else | |||||
| expect (devices.contains (defaultDevice)); | |||||
| } | |||||
| if (devices.size() == 0) | |||||
| expect (defaultDevice == MidiDeviceInfo()); | |||||
| else | |||||
| expect (devices.contains (defaultDevice)); | |||||
| } | |||||
| beginTest ("default device (output)"); | |||||
| { | |||||
| auto devices = MidiOutput::getAvailableDevices(); | |||||
| auto defaultDevice = MidiOutput::getDefaultDevice(); | |||||
| #if JUCE_MAC || JUCE_LINUX || JUCE_IOS | |||||
| String testDeviceName ("TestDevice"); | |||||
| String testDeviceName2 ("TestDevice2"); | |||||
| if (devices.size() == 0) | |||||
| expect (defaultDevice == MidiDeviceInfo()); | |||||
| else | |||||
| expect (devices.contains (defaultDevice)); | |||||
| } | |||||
| struct MessageCallbackHandler : public MidiInputCallback | |||||
| { | |||||
| void handleIncomingMidiMessage (MidiInput* source, const MidiMessage& message) override | |||||
| { | |||||
| const ScopedLock sl (messageLock); | |||||
| #if JUCE_MAC || JUCE_LINUX || JUCE_IOS | |||||
| String testDeviceName ("TestDevice"); | |||||
| String testDeviceName2 ("TestDevice2"); | |||||
| messageSource = source; | |||||
| messageReceived = message; | |||||
| } | |||||
| struct MessageCallbackHandler : public MidiInputCallback | |||||
| { | |||||
| void handleIncomingMidiMessage (MidiInput* source, const MidiMessage& message) override | |||||
| { | |||||
| const ScopedLock sl (messageLock); | |||||
| MidiInput* messageSource = nullptr; | |||||
| MidiMessage messageReceived; | |||||
| CriticalSection messageLock; | |||||
| }; | |||||
| messageSource = source; | |||||
| messageReceived = message; | |||||
| } | |||||
| MessageCallbackHandler handler; | |||||
| MidiInput* messageSource = nullptr; | |||||
| MidiMessage messageReceived; | |||||
| CriticalSection messageLock; | |||||
| }; | |||||
| beginTest ("create device (input)"); | |||||
| { | |||||
| std::unique_ptr<MidiInput> device (MidiInput::createNewDevice (testDeviceName, &handler)); | |||||
| MessageCallbackHandler handler; | |||||
| expect (device.get() != nullptr); | |||||
| expect (device->getName() == testDeviceName); | |||||
| beginTest ("create device (input)"); | |||||
| { | |||||
| std::unique_ptr<MidiInput> device (MidiInput::createNewDevice (testDeviceName, &handler)); | |||||
| device->setName (testDeviceName2); | |||||
| expect (device->getName() == testDeviceName2); | |||||
| } | |||||
| expect (device.get() != nullptr); | |||||
| expect (device->getName() == testDeviceName); | |||||
| beginTest ("create device (output)"); | |||||
| { | |||||
| std::unique_ptr<MidiOutput> device (MidiOutput::createNewDevice (testDeviceName)); | |||||
| device->setName (testDeviceName2); | |||||
| expect (device->getName() == testDeviceName2); | |||||
| } | |||||
| beginTest ("create device (output)"); | |||||
| { | |||||
| std::unique_ptr<MidiOutput> device (MidiOutput::createNewDevice (testDeviceName)); | |||||
| expect (device.get() != nullptr); | |||||
| expect (device->getName() == testDeviceName); | |||||
| } | |||||
| expect (device.get() != nullptr); | |||||
| expect (device->getName() == testDeviceName); | |||||
| } | |||||
| #if JUCE_MODAL_LOOPS_PERMITTED | |||||
| auto testMessage = MidiMessage::noteOn (5, 12, (uint8) 51); | |||||
| #if JUCE_MODAL_LOOPS_PERMITTED | |||||
| auto testMessage = MidiMessage::noteOn (5, 12, (uint8) 51); | |||||
| beginTest ("send messages"); | |||||
| { | |||||
| std::unique_ptr<MidiInput> midiInput (MidiInput::createNewDevice (testDeviceName, &handler)); | |||||
| expect (midiInput.get() != nullptr); | |||||
| midiInput->start(); | |||||
| beginTest ("send messages"); | |||||
| { | |||||
| std::unique_ptr<MidiInput> midiInput (MidiInput::createNewDevice (testDeviceName, &handler)); | |||||
| expect (midiInput.get() != nullptr); | |||||
| midiInput->start(); | |||||
| auto inputInfo = midiInput->getDeviceInfo(); | |||||
| auto inputInfo = midiInput->getDeviceInfo(); | |||||
| expect (MidiOutput::getAvailableDevices().contains (inputInfo)); | |||||
| expect (MidiOutput::getAvailableDevices().contains (inputInfo)); | |||||
| std::unique_ptr<MidiOutput> midiOutput (MidiOutput::openDevice (midiInput->getIdentifier())); | |||||
| expect (midiOutput.get() != nullptr); | |||||
| std::unique_ptr<MidiOutput> midiOutput (MidiOutput::openDevice (midiInput->getIdentifier())); | |||||
| expect (midiOutput.get() != nullptr); | |||||
| midiOutput->sendMessageNow (testMessage); | |||||
| midiOutput->sendMessageNow (testMessage); | |||||
| // Pump the message thread for a bit to allow the message to be delivered | |||||
| MessageManager::getInstance()->runDispatchLoopUntil (100); | |||||
| // Pump the message thread for a bit to allow the message to be delivered | |||||
| MessageManager::getInstance()->runDispatchLoopUntil (100); | |||||
| { | |||||
| const ScopedLock sl (handler.messageLock); | |||||
| { | |||||
| const ScopedLock sl (handler.messageLock); | |||||
| expect (handler.messageSource == midiInput.get()); | |||||
| expect (handler.messageSource == midiInput.get()); | |||||
| expect (handler.messageReceived.getChannel() == testMessage.getChannel()); | |||||
| expect (handler.messageReceived.getNoteNumber() == testMessage.getNoteNumber()); | |||||
| expect (handler.messageReceived.getVelocity() == testMessage.getVelocity()); | |||||
| } | |||||
| expect (handler.messageReceived.getChannel() == testMessage.getChannel()); | |||||
| expect (handler.messageReceived.getNoteNumber() == testMessage.getNoteNumber()); | |||||
| expect (handler.messageReceived.getVelocity() == testMessage.getVelocity()); | |||||
| } | |||||
| midiInput->stop(); | |||||
| } | |||||
| #endif | |||||
| midiInput->stop(); | |||||
| } | |||||
| #endif | |||||
| #endif | |||||
| } | |||||
| }; | |||||
| #endif | |||||
| } | |||||
| }; | |||||
| static MidiDevicesUnitTests MidiDevicesUnitTests; | |||||
| static MidiDevicesUnitTests MidiDevicesUnitTests; | |||||
| #endif | #endif | ||||
| } // namespace juce | } // namespace juce | ||||
| @@ -592,8 +592,8 @@ AudioFormatWriter* CoreAudioFormat::createWriterFor (OutputStream*, | |||||
| return nullptr; | return nullptr; | ||||
| } | } | ||||
| //============================================================================== | //============================================================================== | ||||
| // Unit tests for Core Audio layout conversions | |||||
| //============================================================================== | //============================================================================== | ||||
| #if JUCE_UNIT_TESTS | #if JUCE_UNIT_TESTS | ||||
| @@ -1809,6 +1809,8 @@ bool WavAudioFormat::replaceMetadataInFile (const File& wavFile, const StringPai | |||||
| return slowCopyWavFileWithNewMetadata (wavFile, newMetadata); | return slowCopyWavFileWithNewMetadata (wavFile, newMetadata); | ||||
| } | } | ||||
| //============================================================================== | |||||
| //============================================================================== | //============================================================================== | ||||
| #if JUCE_UNIT_TESTS | #if JUCE_UNIT_TESTS | ||||
| @@ -69,9 +69,12 @@ AudioParameterChoice& AudioParameterChoice::operator= (int newValue) | |||||
| return *this; | return *this; | ||||
| } | } | ||||
| //============================================================================== | |||||
| //============================================================================== | |||||
| #if JUCE_UNIT_TESTS | #if JUCE_UNIT_TESTS | ||||
| static struct AudioParameterChoiceTests final : public UnitTest | |||||
| struct AudioParameterChoiceTests : public UnitTest | |||||
| { | { | ||||
| AudioParameterChoiceTests() : UnitTest ("AudioParameterChoice", "AudioProcessor Parameters") {} | AudioParameterChoiceTests() : UnitTest ("AudioParameterChoice", "AudioProcessor Parameters") {} | ||||
| @@ -112,7 +115,9 @@ static struct AudioParameterChoiceTests final : public UnitTest | |||||
| } | } | ||||
| } | } | ||||
| } audioParameterChoiceTests; | |||||
| }; | |||||
| static AudioParameterChoiceTests audioParameterChoiceTests; | |||||
| #endif | #endif | ||||
| @@ -69,9 +69,12 @@ AudioParameterInt& AudioParameterInt::operator= (int newValue) | |||||
| return *this; | return *this; | ||||
| } | } | ||||
| //============================================================================== | |||||
| //============================================================================== | |||||
| #if JUCE_UNIT_TESTS | #if JUCE_UNIT_TESTS | ||||
| static struct AudioParameterIntTests final : public UnitTest | |||||
| struct AudioParameterIntTests : public UnitTest | |||||
| { | { | ||||
| AudioParameterIntTests() : UnitTest ("AudioParameterInt", "AudioProcessor Parameters") {} | AudioParameterIntTests() : UnitTest ("AudioParameterInt", "AudioProcessor Parameters") {} | ||||
| @@ -117,7 +120,9 @@ static struct AudioParameterIntTests final : public UnitTest | |||||
| expectEquals (intParam.get(), 2); | expectEquals (intParam.get(), 2); | ||||
| } | } | ||||
| } | } | ||||
| } audioParameterIntTests; | |||||
| }; | |||||
| static AudioParameterIntTests audioParameterIntTests; | |||||
| #endif | #endif | ||||
| @@ -740,9 +740,12 @@ AudioProcessorValueTreeState::ButtonAttachment::ButtonAttachment (AudioProcessor | |||||
| AudioProcessorValueTreeState::ButtonAttachment::~ButtonAttachment() {} | AudioProcessorValueTreeState::ButtonAttachment::~ButtonAttachment() {} | ||||
| //============================================================================== | |||||
| //============================================================================== | |||||
| #if JUCE_UNIT_TESTS | #if JUCE_UNIT_TESTS | ||||
| static struct ParameterAdapterTests final : public UnitTest | |||||
| struct ParameterAdapterTests : public UnitTest | |||||
| { | { | ||||
| ParameterAdapterTests() : UnitTest ("Parameter Adapter", "AudioProcessor Parameters") {} | ParameterAdapterTests() : UnitTest ("Parameter Adapter", "AudioProcessor Parameters") {} | ||||
| @@ -812,7 +815,9 @@ static struct ParameterAdapterTests final : public UnitTest | |||||
| test ({ 0, 7.5 }, "2.5", 2.5); | test ({ 0, 7.5 }, "2.5", 2.5); | ||||
| } | } | ||||
| } | } | ||||
| } parameterAdapterTests; | |||||
| }; | |||||
| static ParameterAdapterTests parameterAdapterTests; | |||||
| namespace | namespace | ||||
| { | { | ||||
| @@ -832,7 +837,7 @@ inline bool operator!= (const NormalisableRange<ValueType>& a, | |||||
| } | } | ||||
| } // namespace | } // namespace | ||||
| static class AudioProcessorValueTreeStateTests final : public UnitTest | |||||
| class AudioProcessorValueTreeStateTests : public UnitTest | |||||
| { | { | ||||
| private: | private: | ||||
| using Parameter = AudioProcessorValueTreeState::Parameter; | using Parameter = AudioProcessorValueTreeState::Parameter; | ||||
| @@ -1166,7 +1171,9 @@ public: | |||||
| expectEquals (listener.id, String (key)); | expectEquals (listener.id, String (key)); | ||||
| } | } | ||||
| } | } | ||||
| } audioProcessorValueTreeStateTests; | |||||
| }; | |||||
| static AudioProcessorValueTreeStateTests audioProcessorValueTreeStateTests; | |||||
| #endif | #endif | ||||
| @@ -155,7 +155,11 @@ bool BlocksVersion::operator>= (const BlocksVersion& other) const | |||||
| return (*this > other) || (*this == other); | return (*this > other) || (*this == other); | ||||
| } | } | ||||
| //============================================================================== | |||||
| //============================================================================== | |||||
| #if JUCE_UNIT_TESTS | #if JUCE_UNIT_TESTS | ||||
| class BlocksVersionUnitTests : public UnitTest | class BlocksVersionUnitTests : public UnitTest | ||||
| { | { | ||||
| public: | public: | ||||
| @@ -225,6 +229,7 @@ public: | |||||
| }; | }; | ||||
| static BlocksVersionUnitTests BlocksVersionUnitTests; | static BlocksVersionUnitTests BlocksVersionUnitTests; | ||||
| #endif | #endif | ||||
| } // namespace juce | } // namespace juce | ||||
| @@ -166,6 +166,7 @@ AbstractFifo::ScopedRead AbstractFifo::read (int numToRead) noexcept { ret | |||||
| AbstractFifo::ScopedWrite AbstractFifo::write (int numToWrite) noexcept { return { *this, numToWrite }; } | AbstractFifo::ScopedWrite AbstractFifo::write (int numToWrite) noexcept { return { *this, numToWrite }; } | ||||
| //============================================================================== | |||||
| //============================================================================== | //============================================================================== | ||||
| #if JUCE_UNIT_TESTS | #if JUCE_UNIT_TESTS | ||||
| @@ -1004,6 +1004,7 @@ MemoryMappedFile::MemoryMappedFile (const File& file, const Range<int64>& fileRa | |||||
| } | } | ||||
| //============================================================================== | |||||
| //============================================================================== | //============================================================================== | ||||
| #if JUCE_UNIT_TESTS | #if JUCE_UNIT_TESTS | ||||
| @@ -76,6 +76,8 @@ bool FileInputStream::setPosition (int64 pos) | |||||
| return currentPosition == pos; | return currentPosition == pos; | ||||
| } | } | ||||
| //============================================================================== | |||||
| //============================================================================== | //============================================================================== | ||||
| #if JUCE_UNIT_TESTS | #if JUCE_UNIT_TESTS | ||||
| @@ -538,6 +538,7 @@ Result JSON::parseQuotedString (String::CharPointerType& t, var& result) | |||||
| return Result::fail ("Not a quoted string!"); | return Result::fail ("Not a quoted string!"); | ||||
| } | } | ||||
| //============================================================================== | //============================================================================== | ||||
| //============================================================================== | //============================================================================== | ||||
| #if JUCE_UNIT_TESTS | #if JUCE_UNIT_TESTS | ||||
| @@ -1278,6 +1278,7 @@ uint32 readLittleEndianBitsInBuffer (const void* buffer, uint32 startBit, uint32 | |||||
| return result; | return result; | ||||
| } | } | ||||
| //============================================================================== | //============================================================================== | ||||
| //============================================================================== | //============================================================================== | ||||
| #if JUCE_UNIT_TESTS | #if JUCE_UNIT_TESTS | ||||
| @@ -161,6 +161,8 @@ void Random::fillBitsRandomly (BigInteger& arrayToChange, int startBit, int numB | |||||
| arrayToChange.setBit (startBit + numBits, nextBool()); | arrayToChange.setBit (startBit + numBits, nextBool()); | ||||
| } | } | ||||
| //============================================================================== | |||||
| //============================================================================== | //============================================================================== | ||||
| #if JUCE_UNIT_TESTS | #if JUCE_UNIT_TESTS | ||||
| @@ -372,6 +372,8 @@ Array<IPAddress> IPAddress::getAllAddresses (bool includeIPv6) | |||||
| return addresses; | return addresses; | ||||
| } | } | ||||
| //============================================================================== | |||||
| //============================================================================== | //============================================================================== | ||||
| #if JUCE_UNIT_TESTS | #if JUCE_UNIT_TESTS | ||||
| @@ -60,8 +60,9 @@ String NamedPipe::getName() const | |||||
| // other methods for this class are implemented in the platform-specific files | // other methods for this class are implemented in the platform-specific files | ||||
| //============================================================================== | |||||
| //============================================================================== | |||||
| //============================================================================== | |||||
| #if JUCE_UNIT_TESTS | #if JUCE_UNIT_TESTS | ||||
| class NamedPipeTests : public UnitTest | class NamedPipeTests : public UnitTest | ||||
| @@ -780,6 +780,8 @@ bool DatagramSocket::setEnablePortReuse (bool enabled) | |||||
| #pragma warning (pop) | #pragma warning (pop) | ||||
| #endif | #endif | ||||
| //============================================================================== | |||||
| //============================================================================== | //============================================================================== | ||||
| #if JUCE_UNIT_TESTS | #if JUCE_UNIT_TESTS | ||||
| @@ -196,6 +196,8 @@ String BufferedInputStream::readString() | |||||
| return InputStream::readString(); | return InputStream::readString(); | ||||
| } | } | ||||
| //============================================================================== | |||||
| //============================================================================== | //============================================================================== | ||||
| #if JUCE_UNIT_TESTS | #if JUCE_UNIT_TESTS | ||||
| @@ -95,6 +95,8 @@ void MemoryInputStream::skipNextBytes (int64 numBytesToSkip) | |||||
| setPosition (getPosition() + numBytesToSkip); | setPosition (getPosition() + numBytesToSkip); | ||||
| } | } | ||||
| //============================================================================== | |||||
| //============================================================================== | //============================================================================== | ||||
| #if JUCE_UNIT_TESTS | #if JUCE_UNIT_TESTS | ||||
| @@ -78,6 +78,8 @@ bool SubregionStream::isExhausted() | |||||
| return source->isExhausted(); | return source->isExhausted(); | ||||
| } | } | ||||
| //============================================================================== | |||||
| //============================================================================== | //============================================================================== | ||||
| #if JUCE_UNIT_TESTS | #if JUCE_UNIT_TESTS | ||||
| @@ -179,6 +179,8 @@ juce_wchar CharacterFunctions::getUnicodeCharFromWindows1252Codepage (const uint | |||||
| return (juce_wchar) lookup[c - 0x80]; | return (juce_wchar) lookup[c - 0x80]; | ||||
| } | } | ||||
| //============================================================================== | |||||
| //============================================================================== | //============================================================================== | ||||
| #if JUCE_UNIT_TESTS | #if JUCE_UNIT_TESTS | ||||
| @@ -2300,6 +2300,7 @@ static String serialiseDouble (double input) | |||||
| return reduceLengthOfFloatString (String (input, numberOfDecimalPlaces)); | return reduceLengthOfFloatString (String (input, numberOfDecimalPlaces)); | ||||
| } | } | ||||
| //============================================================================== | //============================================================================== | ||||
| //============================================================================== | //============================================================================== | ||||
| #if JUCE_UNIT_TESTS | #if JUCE_UNIT_TESTS | ||||
| @@ -216,6 +216,7 @@ String TextDiff::Change::appliedTo (const String& text) const noexcept | |||||
| return text.replaceSection (start, length, insertedText); | return text.replaceSection (start, length, insertedText); | ||||
| } | } | ||||
| //============================================================================== | //============================================================================== | ||||
| //============================================================================== | //============================================================================== | ||||
| #if JUCE_UNIT_TESTS | #if JUCE_UNIT_TESTS | ||||
| @@ -80,6 +80,8 @@ String ChildProcess::readAllProcessOutput() | |||||
| return result.toString(); | return result.toString(); | ||||
| } | } | ||||
| //============================================================================== | |||||
| //============================================================================== | //============================================================================== | ||||
| #if JUCE_UNIT_TESTS | #if JUCE_UNIT_TESTS | ||||
| @@ -350,9 +350,11 @@ bool JUCE_CALLTYPE Process::isRunningUnderDebugger() noexcept | |||||
| return juce_isRunningUnderDebugger(); | return juce_isRunningUnderDebugger(); | ||||
| } | } | ||||
| #if JUCE_UNIT_TESTS | |||||
| //============================================================================== | //============================================================================== | ||||
| //============================================================================== | |||||
| #if JUCE_UNIT_TESTS | |||||
| class AtomicTests : public UnitTest | class AtomicTests : public UnitTest | ||||
| { | { | ||||
| public: | public: | ||||
| @@ -925,6 +925,7 @@ void XmlElement::deleteAllTextElements() noexcept | |||||
| } | } | ||||
| } | } | ||||
| //============================================================================== | |||||
| //============================================================================== | //============================================================================== | ||||
| #if JUCE_UNIT_TESTS | #if JUCE_UNIT_TESTS | ||||
| @@ -154,6 +154,8 @@ bool GZIPCompressorOutputStream::setPosition (int64 /*newPosition*/) | |||||
| return false; | return false; | ||||
| } | } | ||||
| //============================================================================== | |||||
| //============================================================================== | //============================================================================== | ||||
| #if JUCE_UNIT_TESTS | #if JUCE_UNIT_TESTS | ||||
| @@ -298,6 +298,8 @@ bool GZIPDecompressorInputStream::setPosition (int64 newPos) | |||||
| return true; | return true; | ||||
| } | } | ||||
| //============================================================================== | |||||
| //============================================================================== | //============================================================================== | ||||
| #if JUCE_UNIT_TESTS | #if JUCE_UNIT_TESTS | ||||
| @@ -638,6 +638,8 @@ bool ZipFile::Builder::writeToStream (OutputStream& target, double* const progre | |||||
| return true; | return true; | ||||
| } | } | ||||
| //============================================================================== | |||||
| //============================================================================== | //============================================================================== | ||||
| #if JUCE_UNIT_TESTS | #if JUCE_UNIT_TESTS | ||||
| @@ -366,6 +366,8 @@ int BlowFish::unpad (const void* data, size_t size) noexcept | |||||
| return static_cast<int> (size - static_cast<size_t> (paddingSize)); | return static_cast<int> (size - static_cast<size_t> (paddingSize)); | ||||
| } | } | ||||
| //============================================================================== | |||||
| //============================================================================== | //============================================================================== | ||||
| #if JUCE_UNIT_TESTS | #if JUCE_UNIT_TESTS | ||||
| @@ -304,6 +304,7 @@ bool MD5::operator== (const MD5& other) const noexcept { return memcmp (result | |||||
| bool MD5::operator!= (const MD5& other) const noexcept { return ! operator== (other); } | bool MD5::operator!= (const MD5& other) const noexcept { return ! operator== (other); } | ||||
| //============================================================================== | |||||
| //============================================================================== | //============================================================================== | ||||
| #if JUCE_UNIT_TESTS | #if JUCE_UNIT_TESTS | ||||
| @@ -623,6 +623,7 @@ bool Whirlpool::operator== (const Whirlpool& other) const noexcept { return mem | |||||
| bool Whirlpool::operator!= (const Whirlpool& other) const noexcept { return ! operator== (other); } | bool Whirlpool::operator!= (const Whirlpool& other) const noexcept { return ! operator== (other); } | ||||
| //============================================================================== | |||||
| //============================================================================== | //============================================================================== | ||||
| #if JUCE_UNIT_TESTS | #if JUCE_UNIT_TESTS | ||||
| @@ -1095,6 +1095,8 @@ void ValueTree::Listener::valueTreeChildOrderChanged (ValueTree&, int, int) | |||||
| void ValueTree::Listener::valueTreeParentChanged (ValueTree&) {} | void ValueTree::Listener::valueTreeParentChanged (ValueTree&) {} | ||||
| void ValueTree::Listener::valueTreeRedirected (ValueTree&) {} | void ValueTree::Listener::valueTreeRedirected (ValueTree&) {} | ||||
| //============================================================================== | |||||
| //============================================================================== | //============================================================================== | ||||
| #if JUCE_UNIT_TESTS | #if JUCE_UNIT_TESTS | ||||
| @@ -1260,6 +1260,6 @@ struct GridTests : public UnitTest | |||||
| static GridTests gridUnitTests; | static GridTests gridUnitTests; | ||||
| #endif // JUCE_UNIT_TESTS | |||||
| #endif | |||||
| } // namespace juce | } // namespace juce | ||||
| @@ -394,6 +394,7 @@ String OSCAddressPattern::toString() const noexcept | |||||
| return asString; | return asString; | ||||
| } | } | ||||
| //============================================================================== | //============================================================================== | ||||
| //============================================================================== | //============================================================================== | ||||
| #if JUCE_UNIT_TESTS | #if JUCE_UNIT_TESTS | ||||
| @@ -780,6 +781,6 @@ public: | |||||
| static OSCPatternMatcherTests OSCPatternMatcherUnitTests; | static OSCPatternMatcherTests OSCPatternMatcherUnitTests; | ||||
| #endif // JUCE_UNIT_TESTS | |||||
| #endif | |||||
| } // namespace juce | } // namespace juce | ||||
| @@ -78,6 +78,7 @@ OSCColour OSCArgument::getColour() const noexcept | |||||
| return { 0, 0, 0, 0 }; | return { 0, 0, 0, 0 }; | ||||
| } | } | ||||
| //============================================================================== | //============================================================================== | ||||
| //============================================================================== | //============================================================================== | ||||
| #if JUCE_UNIT_TESTS | #if JUCE_UNIT_TESTS | ||||
| @@ -242,6 +243,6 @@ public: | |||||
| static OSCArgumentTests OSCArgumentUnitTests; | static OSCArgumentTests OSCArgumentUnitTests; | ||||
| #endif // JUCE_UNIT_TESTS | |||||
| #endif | |||||
| } // namespace juce | } // namespace juce | ||||
| @@ -108,6 +108,8 @@ const OSCBundle& OSCBundle::Element::getBundle() const | |||||
| return *bundle; | return *bundle; | ||||
| } | } | ||||
| //============================================================================== | |||||
| //============================================================================== | //============================================================================== | ||||
| #if JUCE_UNIT_TESTS | #if JUCE_UNIT_TESTS | ||||
| @@ -239,6 +241,6 @@ public: | |||||
| static OSCBundleElementTests OSCBundleElementUnitTests; | static OSCBundleElementTests OSCBundleElementUnitTests; | ||||
| #endif // JUCE_UNIT_TESTS | |||||
| #endif | |||||
| } // namespace juce | } // namespace juce | ||||
| @@ -86,6 +86,7 @@ void OSCMessage::addBlob (MemoryBlock blob) { arguments.add (OSCArgument | |||||
| void OSCMessage::addColour (OSCColour colour) { arguments.add (OSCArgument (colour)); } | void OSCMessage::addColour (OSCColour colour) { arguments.add (OSCArgument (colour)); } | ||||
| void OSCMessage::addArgument (OSCArgument arg) { arguments.add (arg); } | void OSCMessage::addArgument (OSCArgument arg) { arguments.add (arg); } | ||||
| //============================================================================== | //============================================================================== | ||||
| //============================================================================== | //============================================================================== | ||||
| #if JUCE_UNIT_TESTS | #if JUCE_UNIT_TESTS | ||||
| @@ -210,6 +211,6 @@ public: | |||||
| static OSCMessageTests OSCMessageUnitTests; | static OSCMessageTests OSCMessageUnitTests; | ||||
| #endif // JUCE_UNIT_TESTS | |||||
| #endif | |||||
| } // namespace juce | } // namespace juce | ||||
| @@ -1188,6 +1188,6 @@ public: | |||||
| static OSCInputStreamTests OSCInputStreamUnitTests; | static OSCInputStreamTests OSCInputStreamUnitTests; | ||||
| #endif // JUCE_UNIT_TESTS | |||||
| #endif | |||||
| } // namespace juce | } // namespace juce | ||||
| @@ -332,6 +332,7 @@ bool OSCSender::send (const OSCBundle& bundle) { return pimpl->send (bundle | |||||
| bool OSCSender::sendToIPAddress (const String& host, int port, const OSCMessage& message) { return pimpl->send (message, host, port); } | bool OSCSender::sendToIPAddress (const String& host, int port, const OSCMessage& message) { return pimpl->send (message, host, port); } | ||||
| bool OSCSender::sendToIPAddress (const String& host, int port, const OSCBundle& bundle) { return pimpl->send (bundle, host, port); } | bool OSCSender::sendToIPAddress (const String& host, int port, const OSCBundle& bundle) { return pimpl->send (bundle, host, port); } | ||||
| //============================================================================== | //============================================================================== | ||||
| //============================================================================== | //============================================================================== | ||||
| #if JUCE_UNIT_TESTS | #if JUCE_UNIT_TESTS | ||||
| @@ -867,7 +868,6 @@ public: | |||||
| static OSCRoundTripTests OSCRoundTripUnitTests; | static OSCRoundTripTests OSCRoundTripUnitTests; | ||||
| //============================================================================== | |||||
| #endif // JUCE_UNIT_TESTS | |||||
| #endif | |||||
| } // namespace juce | } // namespace juce | ||||