Browse Source

Tidied up unit test code layout

tags/2021-05-28
ed 6 years ago
parent
commit
f3af250ff7
51 changed files with 201 additions and 108 deletions
  1. +3
    -1
      modules/juce_analytics/destinations/juce_ThreadedAnalyticsDestination.cpp
  2. +4
    -0
      modules/juce_audio_basics/buffers/juce_AudioChannelSet.cpp
  3. +1
    -0
      modules/juce_audio_basics/buffers/juce_AudioDataConverters.cpp
  4. +1
    -0
      modules/juce_audio_basics/buffers/juce_FloatVectorOperations.cpp
  5. +3
    -0
      modules/juce_audio_basics/midi/juce_MidiMessageSequence.cpp
  6. +2
    -1
      modules/juce_audio_basics/midi/juce_MidiRPN.cpp
  7. +2
    -1
      modules/juce_audio_basics/mpe/juce_MPEInstrument.cpp
  8. +2
    -1
      modules/juce_audio_basics/mpe/juce_MPEMessages.cpp
  9. +2
    -1
      modules/juce_audio_basics/mpe/juce_MPENote.cpp
  10. +2
    -0
      modules/juce_audio_basics/mpe/juce_MPEUtils.cpp
  11. +2
    -1
      modules/juce_audio_basics/mpe/juce_MPEValue.cpp
  12. +2
    -1
      modules/juce_audio_basics/mpe/juce_MPEZoneLayout.cpp
  13. +87
    -82
      modules/juce_audio_devices/midi_io/juce_MidiDevices.cpp
  14. +1
    -1
      modules/juce_audio_formats/codecs/juce_CoreAudioFormat.cpp
  15. +2
    -0
      modules/juce_audio_formats/codecs/juce_WavAudioFormat.cpp
  16. +7
    -2
      modules/juce_audio_processors/utilities/juce_AudioParameterChoice.cpp
  17. +7
    -2
      modules/juce_audio_processors/utilities/juce_AudioParameterInt.cpp
  18. +11
    -4
      modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.cpp
  19. +5
    -0
      modules/juce_blocks_basics/blocks/juce_BlocksVersion.cpp
  20. +1
    -0
      modules/juce_core/containers/juce_AbstractFifo.cpp
  21. +1
    -0
      modules/juce_core/files/juce_File.cpp
  22. +2
    -0
      modules/juce_core/files/juce_FileInputStream.cpp
  23. +1
    -0
      modules/juce_core/javascript/juce_JSON.cpp
  24. +1
    -0
      modules/juce_core/maths/juce_BigInteger.cpp
  25. +2
    -0
      modules/juce_core/maths/juce_Random.cpp
  26. +2
    -0
      modules/juce_core/network/juce_IPAddress.cpp
  27. +2
    -1
      modules/juce_core/network/juce_NamedPipe.cpp
  28. +2
    -0
      modules/juce_core/network/juce_Socket.cpp
  29. +2
    -0
      modules/juce_core/streams/juce_BufferedInputStream.cpp
  30. +2
    -0
      modules/juce_core/streams/juce_MemoryInputStream.cpp
  31. +2
    -0
      modules/juce_core/streams/juce_SubregionStream.cpp
  32. +2
    -0
      modules/juce_core/text/juce_CharacterFunctions.cpp
  33. +1
    -0
      modules/juce_core/text/juce_String.cpp
  34. +1
    -0
      modules/juce_core/text/juce_TextDiff.cpp
  35. +2
    -0
      modules/juce_core/threads/juce_ChildProcess.cpp
  36. +3
    -1
      modules/juce_core/threads/juce_Thread.cpp
  37. +1
    -0
      modules/juce_core/xml/juce_XmlElement.cpp
  38. +2
    -0
      modules/juce_core/zip/juce_GZIPCompressorOutputStream.cpp
  39. +2
    -0
      modules/juce_core/zip/juce_GZIPDecompressorInputStream.cpp
  40. +2
    -0
      modules/juce_core/zip/juce_ZipFile.cpp
  41. +2
    -0
      modules/juce_cryptography/encryption/juce_BlowFish.cpp
  42. +1
    -0
      modules/juce_cryptography/hashing/juce_MD5.cpp
  43. +1
    -0
      modules/juce_cryptography/hashing/juce_Whirlpool.cpp
  44. +2
    -0
      modules/juce_data_structures/values/juce_ValueTree.cpp
  45. +1
    -1
      modules/juce_gui_basics/layout/juce_Grid.cpp
  46. +2
    -1
      modules/juce_osc/osc/juce_OSCAddress.cpp
  47. +2
    -1
      modules/juce_osc/osc/juce_OSCArgument.cpp
  48. +3
    -1
      modules/juce_osc/osc/juce_OSCBundle.cpp
  49. +2
    -1
      modules/juce_osc/osc/juce_OSCMessage.cpp
  50. +1
    -1
      modules/juce_osc/osc/juce_OSCReceiver.cpp
  51. +2
    -2
      modules/juce_osc/osc/juce_OSCSender.cpp

+ 3
- 1
modules/juce_analytics/destinations/juce_ThreadedAnalyticsDestination.cpp View File

@@ -141,6 +141,8 @@ void ThreadedAnalyticsDestination::EventDispatcher::addToQueue (const AnalyticsE
eventQueue.push_back (event);
}
//==============================================================================
//==============================================================================
#if JUCE_UNIT_TESTS
@@ -213,7 +215,7 @@ namespace DestinationTestHelpers
struct ThreadedAnalyticsDestinationTests : public UnitTest
{
ThreadedAnalyticsDestinationTests()
: UnitTest ("ThreadedAnalyticsDestination")
: UnitTest ("ThreadedAnalyticsDestination", "Analytics")
{}
void compareEventQueues (const std::deque<AnalyticsDestination::AnalyticsEvent>& a,


+ 4
- 0
modules/juce_audio_basics/buffers/juce_AudioChannelSet.cpp View File

@@ -557,8 +557,11 @@ int JUCE_CALLTYPE AudioChannelSet::getAmbisonicOrderForNumChannels (int numChann
return (static_cast<float> (ambisonicOrder) == sqrtMinusOne ? ambisonicOrder : -1);
}
//==============================================================================
//==============================================================================
#if JUCE_UNIT_TESTS
class AudioChannelSetUnitTest : public UnitTest
{
public:
@@ -645,6 +648,7 @@ private:
};
static AudioChannelSetUnitTest audioChannelSetUnitTest;
#endif
} // namespace juce

+ 1
- 0
modules/juce_audio_basics/buffers/juce_AudioDataConverters.cpp View File

@@ -460,6 +460,7 @@ void AudioDataConverters::deinterleaveSamples (const float* source, float** dest
}
//==============================================================================
//==============================================================================
#if JUCE_UNIT_TESTS


+ 1
- 0
modules/juce_audio_basics/buffers/juce_FloatVectorOperations.cpp View File

@@ -1139,6 +1139,7 @@ ScopedNoDenormals::~ScopedNoDenormals() noexcept
#endif
}
//==============================================================================
//==============================================================================
#if JUCE_UNIT_TESTS


+ 3
- 0
modules/juce_audio_basics/midi/juce_MidiMessageSequence.cpp View File

@@ -344,6 +344,9 @@ void MidiMessageSequence::createControllerUpdatesForTime (int channelNumber, dou
}
}
//==============================================================================
//==============================================================================
#if JUCE_UNIT_TESTS
struct MidiMessageSequenceTest : public UnitTest


+ 2
- 1
modules/juce_audio_basics/midi/juce_MidiRPN.cpp View File

@@ -159,6 +159,7 @@ MidiBuffer MidiRPNGenerator::generate (int midiChannel,
return buffer;
}
//==============================================================================
//==============================================================================
#if JUCE_UNIT_TESTS
@@ -371,6 +372,6 @@ private:
static MidiRPNGeneratorTests MidiRPNGeneratorUnitTests;
#endif // JUCE_UNIT_TESTS
#endif
} // namespace juce

+ 2
- 1
modules/juce_audio_basics/mpe/juce_MPEInstrument.cpp View File

@@ -791,6 +791,7 @@ void MPEInstrument::releaseAllNotes()
notes.clear();
}
//==============================================================================
//==============================================================================
#if JUCE_UNIT_TESTS
@@ -2286,6 +2287,6 @@ private:
static MPEInstrumentTests MPEInstrumentUnitTests;
#endif // JUCE_UNIT_TESTS
#endif
} // namespace juce

+ 2
- 1
modules/juce_audio_basics/mpe/juce_MPEMessages.cpp View File

@@ -106,6 +106,7 @@ MidiBuffer MPEMessages::setZoneLayout (MPEZoneLayout layout)
return buffer;
}
//==============================================================================
//==============================================================================
#if JUCE_UNIT_TESTS
@@ -233,6 +234,6 @@ private:
static MPEMessagesTests MPEMessagesUnitTests;
#endif // JUCE_UNIT_TESTS
#endif
} // namespace juce

+ 2
- 1
modules/juce_audio_basics/mpe/juce_MPENote.cpp View File

@@ -84,6 +84,7 @@ bool MPENote::operator!= (const MPENote& other) const noexcept
return noteID != other.noteID;
}
//==============================================================================
//==============================================================================
#if JUCE_UNIT_TESTS
@@ -119,6 +120,6 @@ private:
static MPENoteTests MPENoteUnitTests;
#endif // JUCE_UNIT_TESTS
#endif
} // namespace juce

+ 2
- 0
modules/juce_audio_basics/mpe/juce_MPEUtils.cpp View File

@@ -255,6 +255,7 @@ void MPEChannelRemapper::zeroArrays()
}
}
//==============================================================================
//==============================================================================
#if JUCE_UNIT_TESTS
@@ -475,4 +476,5 @@ struct MPEUtilsUnitTests : public UnitTest
static MPEUtilsUnitTests MPEUtilsUnitTests;
#endif
} // namespace juce

+ 2
- 1
modules/juce_audio_basics/mpe/juce_MPEValue.cpp View File

@@ -82,6 +82,7 @@ bool MPEValue::operator!= (const MPEValue& other) const noexcept
return ! operator== (other);
}
//==============================================================================
//==============================================================================
#if JUCE_UNIT_TESTS
@@ -165,6 +166,6 @@ private:
static MPEValueTests MPEValueUnitTests;
#endif // JUCE_UNIT_TESTS
#endif
} // namespace juce

+ 2
- 1
modules/juce_audio_basics/mpe/juce_MPEZoneLayout.cpp View File

@@ -205,6 +205,7 @@ void MPEZoneLayout::checkAndLimitZoneParameters (int minValue, int maxValue,
}
}
//==============================================================================
//==============================================================================
#if JUCE_UNIT_TESTS
@@ -382,6 +383,6 @@ public:
static MPEZoneLayoutTests MPEZoneLayoutUnitTests;
#endif // JUCE_UNIT_TESTS
#endif
} // namespace juce

+ 87
- 82
modules/juce_audio_devices/midi_io/juce_MidiDevices.cpp View File

@@ -157,116 +157,121 @@ void MidiOutput::run()
clearAllPendingMessages();
}
//==============================================================================
//==============================================================================
#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
} // namespace juce

+ 1
- 1
modules/juce_audio_formats/codecs/juce_CoreAudioFormat.cpp View File

@@ -592,8 +592,8 @@ AudioFormatWriter* CoreAudioFormat::createWriterFor (OutputStream*,
return nullptr;
}
//==============================================================================
// Unit tests for Core Audio layout conversions
//==============================================================================
#if JUCE_UNIT_TESTS


+ 2
- 0
modules/juce_audio_formats/codecs/juce_WavAudioFormat.cpp View File

@@ -1809,6 +1809,8 @@ bool WavAudioFormat::replaceMetadataInFile (const File& wavFile, const StringPai
return slowCopyWavFileWithNewMetadata (wavFile, newMetadata);
}
//==============================================================================
//==============================================================================
#if JUCE_UNIT_TESTS


+ 7
- 2
modules/juce_audio_processors/utilities/juce_AudioParameterChoice.cpp View File

@@ -69,9 +69,12 @@ AudioParameterChoice& AudioParameterChoice::operator= (int newValue)
return *this;
}
//==============================================================================
//==============================================================================
#if JUCE_UNIT_TESTS
static struct AudioParameterChoiceTests final : public UnitTest
struct AudioParameterChoiceTests : public UnitTest
{
AudioParameterChoiceTests() : UnitTest ("AudioParameterChoice", "AudioProcessor Parameters") {}
@@ -112,7 +115,9 @@ static struct AudioParameterChoiceTests final : public UnitTest
}
}
} audioParameterChoiceTests;
};
static AudioParameterChoiceTests audioParameterChoiceTests;
#endif


+ 7
- 2
modules/juce_audio_processors/utilities/juce_AudioParameterInt.cpp View File

@@ -69,9 +69,12 @@ AudioParameterInt& AudioParameterInt::operator= (int newValue)
return *this;
}
//==============================================================================
//==============================================================================
#if JUCE_UNIT_TESTS
static struct AudioParameterIntTests final : public UnitTest
struct AudioParameterIntTests : public UnitTest
{
AudioParameterIntTests() : UnitTest ("AudioParameterInt", "AudioProcessor Parameters") {}
@@ -117,7 +120,9 @@ static struct AudioParameterIntTests final : public UnitTest
expectEquals (intParam.get(), 2);
}
}
} audioParameterIntTests;
};
static AudioParameterIntTests audioParameterIntTests;
#endif


+ 11
- 4
modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.cpp View File

@@ -740,9 +740,12 @@ AudioProcessorValueTreeState::ButtonAttachment::ButtonAttachment (AudioProcessor
AudioProcessorValueTreeState::ButtonAttachment::~ButtonAttachment() {}
//==============================================================================
//==============================================================================
#if JUCE_UNIT_TESTS
static struct ParameterAdapterTests final : public UnitTest
struct ParameterAdapterTests : public UnitTest
{
ParameterAdapterTests() : UnitTest ("Parameter Adapter", "AudioProcessor Parameters") {}
@@ -812,7 +815,9 @@ static struct ParameterAdapterTests final : public UnitTest
test ({ 0, 7.5 }, "2.5", 2.5);
}
}
} parameterAdapterTests;
};
static ParameterAdapterTests parameterAdapterTests;
namespace
{
@@ -832,7 +837,7 @@ inline bool operator!= (const NormalisableRange<ValueType>& a,
}
} // namespace
static class AudioProcessorValueTreeStateTests final : public UnitTest
class AudioProcessorValueTreeStateTests : public UnitTest
{
private:
using Parameter = AudioProcessorValueTreeState::Parameter;
@@ -1166,7 +1171,9 @@ public:
expectEquals (listener.id, String (key));
}
}
} audioProcessorValueTreeStateTests;
};
static AudioProcessorValueTreeStateTests audioProcessorValueTreeStateTests;
#endif


+ 5
- 0
modules/juce_blocks_basics/blocks/juce_BlocksVersion.cpp View File

@@ -155,7 +155,11 @@ bool BlocksVersion::operator>= (const BlocksVersion& other) const
return (*this > other) || (*this == other);
}
//==============================================================================
//==============================================================================
#if JUCE_UNIT_TESTS
class BlocksVersionUnitTests : public UnitTest
{
public:
@@ -225,6 +229,7 @@ public:
};
static BlocksVersionUnitTests BlocksVersionUnitTests;
#endif
} // namespace juce

+ 1
- 0
modules/juce_core/containers/juce_AbstractFifo.cpp View File

@@ -166,6 +166,7 @@ AbstractFifo::ScopedRead AbstractFifo::read (int numToRead) noexcept { ret
AbstractFifo::ScopedWrite AbstractFifo::write (int numToWrite) noexcept { return { *this, numToWrite }; }
//==============================================================================
//==============================================================================
#if JUCE_UNIT_TESTS


+ 1
- 0
modules/juce_core/files/juce_File.cpp View File

@@ -1004,6 +1004,7 @@ MemoryMappedFile::MemoryMappedFile (const File& file, const Range<int64>& fileRa
}
//==============================================================================
//==============================================================================
#if JUCE_UNIT_TESTS


+ 2
- 0
modules/juce_core/files/juce_FileInputStream.cpp View File

@@ -76,6 +76,8 @@ bool FileInputStream::setPosition (int64 pos)
return currentPosition == pos;
}
//==============================================================================
//==============================================================================
#if JUCE_UNIT_TESTS


+ 1
- 0
modules/juce_core/javascript/juce_JSON.cpp View File

@@ -538,6 +538,7 @@ Result JSON::parseQuotedString (String::CharPointerType& t, var& result)
return Result::fail ("Not a quoted string!");
}
//==============================================================================
//==============================================================================
#if JUCE_UNIT_TESTS


+ 1
- 0
modules/juce_core/maths/juce_BigInteger.cpp View File

@@ -1278,6 +1278,7 @@ uint32 readLittleEndianBitsInBuffer (const void* buffer, uint32 startBit, uint32
return result;
}
//==============================================================================
//==============================================================================
#if JUCE_UNIT_TESTS


+ 2
- 0
modules/juce_core/maths/juce_Random.cpp View File

@@ -161,6 +161,8 @@ void Random::fillBitsRandomly (BigInteger& arrayToChange, int startBit, int numB
arrayToChange.setBit (startBit + numBits, nextBool());
}
//==============================================================================
//==============================================================================
#if JUCE_UNIT_TESTS


+ 2
- 0
modules/juce_core/network/juce_IPAddress.cpp View File

@@ -372,6 +372,8 @@ Array<IPAddress> IPAddress::getAllAddresses (bool includeIPv6)
return addresses;
}
//==============================================================================
//==============================================================================
#if JUCE_UNIT_TESTS


+ 2
- 1
modules/juce_core/network/juce_NamedPipe.cpp View File

@@ -60,8 +60,9 @@ String NamedPipe::getName() const
// other methods for this class are implemented in the platform-specific files
//==============================================================================
//==============================================================================
//==============================================================================
#if JUCE_UNIT_TESTS
class NamedPipeTests : public UnitTest


+ 2
- 0
modules/juce_core/network/juce_Socket.cpp View File

@@ -780,6 +780,8 @@ bool DatagramSocket::setEnablePortReuse (bool enabled)
#pragma warning (pop)
#endif
//==============================================================================
//==============================================================================
#if JUCE_UNIT_TESTS


+ 2
- 0
modules/juce_core/streams/juce_BufferedInputStream.cpp View File

@@ -196,6 +196,8 @@ String BufferedInputStream::readString()
return InputStream::readString();
}
//==============================================================================
//==============================================================================
#if JUCE_UNIT_TESTS


+ 2
- 0
modules/juce_core/streams/juce_MemoryInputStream.cpp View File

@@ -95,6 +95,8 @@ void MemoryInputStream::skipNextBytes (int64 numBytesToSkip)
setPosition (getPosition() + numBytesToSkip);
}
//==============================================================================
//==============================================================================
#if JUCE_UNIT_TESTS


+ 2
- 0
modules/juce_core/streams/juce_SubregionStream.cpp View File

@@ -78,6 +78,8 @@ bool SubregionStream::isExhausted()
return source->isExhausted();
}
//==============================================================================
//==============================================================================
#if JUCE_UNIT_TESTS


+ 2
- 0
modules/juce_core/text/juce_CharacterFunctions.cpp View File

@@ -179,6 +179,8 @@ juce_wchar CharacterFunctions::getUnicodeCharFromWindows1252Codepage (const uint
return (juce_wchar) lookup[c - 0x80];
}
//==============================================================================
//==============================================================================
#if JUCE_UNIT_TESTS


+ 1
- 0
modules/juce_core/text/juce_String.cpp View File

@@ -2300,6 +2300,7 @@ static String serialiseDouble (double input)
return reduceLengthOfFloatString (String (input, numberOfDecimalPlaces));
}
//==============================================================================
//==============================================================================
#if JUCE_UNIT_TESTS


+ 1
- 0
modules/juce_core/text/juce_TextDiff.cpp View File

@@ -216,6 +216,7 @@ String TextDiff::Change::appliedTo (const String& text) const noexcept
return text.replaceSection (start, length, insertedText);
}
//==============================================================================
//==============================================================================
#if JUCE_UNIT_TESTS


+ 2
- 0
modules/juce_core/threads/juce_ChildProcess.cpp View File

@@ -80,6 +80,8 @@ String ChildProcess::readAllProcessOutput()
return result.toString();
}
//==============================================================================
//==============================================================================
#if JUCE_UNIT_TESTS


+ 3
- 1
modules/juce_core/threads/juce_Thread.cpp View File

@@ -350,9 +350,11 @@ bool JUCE_CALLTYPE Process::isRunningUnderDebugger() noexcept
return juce_isRunningUnderDebugger();
}
#if JUCE_UNIT_TESTS
//==============================================================================
//==============================================================================
#if JUCE_UNIT_TESTS
class AtomicTests : public UnitTest
{
public:


+ 1
- 0
modules/juce_core/xml/juce_XmlElement.cpp View File

@@ -925,6 +925,7 @@ void XmlElement::deleteAllTextElements() noexcept
}
}
//==============================================================================
//==============================================================================
#if JUCE_UNIT_TESTS


+ 2
- 0
modules/juce_core/zip/juce_GZIPCompressorOutputStream.cpp View File

@@ -154,6 +154,8 @@ bool GZIPCompressorOutputStream::setPosition (int64 /*newPosition*/)
return false;
}
//==============================================================================
//==============================================================================
#if JUCE_UNIT_TESTS


+ 2
- 0
modules/juce_core/zip/juce_GZIPDecompressorInputStream.cpp View File

@@ -298,6 +298,8 @@ bool GZIPDecompressorInputStream::setPosition (int64 newPos)
return true;
}
//==============================================================================
//==============================================================================
#if JUCE_UNIT_TESTS


+ 2
- 0
modules/juce_core/zip/juce_ZipFile.cpp View File

@@ -638,6 +638,8 @@ bool ZipFile::Builder::writeToStream (OutputStream& target, double* const progre
return true;
}
//==============================================================================
//==============================================================================
#if JUCE_UNIT_TESTS


+ 2
- 0
modules/juce_cryptography/encryption/juce_BlowFish.cpp View File

@@ -366,6 +366,8 @@ int BlowFish::unpad (const void* data, size_t size) noexcept
return static_cast<int> (size - static_cast<size_t> (paddingSize));
}
//==============================================================================
//==============================================================================
#if JUCE_UNIT_TESTS


+ 1
- 0
modules/juce_cryptography/hashing/juce_MD5.cpp View File

@@ -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); }
//==============================================================================
//==============================================================================
#if JUCE_UNIT_TESTS


+ 1
- 0
modules/juce_cryptography/hashing/juce_Whirlpool.cpp View File

@@ -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); }
//==============================================================================
//==============================================================================
#if JUCE_UNIT_TESTS


+ 2
- 0
modules/juce_data_structures/values/juce_ValueTree.cpp View File

@@ -1095,6 +1095,8 @@ void ValueTree::Listener::valueTreeChildOrderChanged (ValueTree&, int, int)
void ValueTree::Listener::valueTreeParentChanged (ValueTree&) {}
void ValueTree::Listener::valueTreeRedirected (ValueTree&) {}
//==============================================================================
//==============================================================================
#if JUCE_UNIT_TESTS


+ 1
- 1
modules/juce_gui_basics/layout/juce_Grid.cpp View File

@@ -1260,6 +1260,6 @@ struct GridTests : public UnitTest
static GridTests gridUnitTests;
#endif // JUCE_UNIT_TESTS
#endif
} // namespace juce

+ 2
- 1
modules/juce_osc/osc/juce_OSCAddress.cpp View File

@@ -394,6 +394,7 @@ String OSCAddressPattern::toString() const noexcept
return asString;
}
//==============================================================================
//==============================================================================
#if JUCE_UNIT_TESTS
@@ -780,6 +781,6 @@ public:
static OSCPatternMatcherTests OSCPatternMatcherUnitTests;
#endif // JUCE_UNIT_TESTS
#endif
} // namespace juce

+ 2
- 1
modules/juce_osc/osc/juce_OSCArgument.cpp View File

@@ -78,6 +78,7 @@ OSCColour OSCArgument::getColour() const noexcept
return { 0, 0, 0, 0 };
}
//==============================================================================
//==============================================================================
#if JUCE_UNIT_TESTS
@@ -242,6 +243,6 @@ public:
static OSCArgumentTests OSCArgumentUnitTests;
#endif // JUCE_UNIT_TESTS
#endif
} // namespace juce

+ 3
- 1
modules/juce_osc/osc/juce_OSCBundle.cpp View File

@@ -108,6 +108,8 @@ const OSCBundle& OSCBundle::Element::getBundle() const
return *bundle;
}
//==============================================================================
//==============================================================================
#if JUCE_UNIT_TESTS
@@ -239,6 +241,6 @@ public:
static OSCBundleElementTests OSCBundleElementUnitTests;
#endif // JUCE_UNIT_TESTS
#endif
} // namespace juce

+ 2
- 1
modules/juce_osc/osc/juce_OSCMessage.cpp View File

@@ -86,6 +86,7 @@ void OSCMessage::addBlob (MemoryBlock blob) { arguments.add (OSCArgument
void OSCMessage::addColour (OSCColour colour) { arguments.add (OSCArgument (colour)); }
void OSCMessage::addArgument (OSCArgument arg) { arguments.add (arg); }
//==============================================================================
//==============================================================================
#if JUCE_UNIT_TESTS
@@ -210,6 +211,6 @@ public:
static OSCMessageTests OSCMessageUnitTests;
#endif // JUCE_UNIT_TESTS
#endif
} // namespace juce

+ 1
- 1
modules/juce_osc/osc/juce_OSCReceiver.cpp View File

@@ -1188,6 +1188,6 @@ public:
static OSCInputStreamTests OSCInputStreamUnitTests;
#endif // JUCE_UNIT_TESTS
#endif
} // namespace juce

+ 2
- 2
modules/juce_osc/osc/juce_OSCSender.cpp View File

@@ -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 OSCBundle& bundle) { return pimpl->send (bundle, host, port); }
//==============================================================================
//==============================================================================
#if JUCE_UNIT_TESTS
@@ -867,7 +868,6 @@ public:
static OSCRoundTripTests OSCRoundTripUnitTests;
//==============================================================================
#endif // JUCE_UNIT_TESTS
#endif
} // namespace juce

Loading…
Cancel
Save