Browse Source

Unit tests: Added an optional argument to the UnitTest constructor to specify a category and methods to get and run unit tests in a specified category. Updated the built-in JUCE unit tests and Demo project to use categories.

tags/2021-05-28
ed 8 years ago
parent
commit
6bfcd820b4
42 changed files with 129 additions and 62 deletions
  1. +32
    -13
      examples/Demo/Source/Demos/UnitTestsDemo.cpp
  2. +1
    -1
      modules/juce_audio_basics/buffers/juce_AudioDataConverters.cpp
  3. +1
    -1
      modules/juce_audio_basics/buffers/juce_FloatVectorOperations.cpp
  4. +2
    -2
      modules/juce_audio_basics/midi/juce_MidiRPN.cpp
  5. +1
    -1
      modules/juce_audio_basics/mpe/juce_MPEInstrument.cpp
  6. +1
    -1
      modules/juce_audio_basics/mpe/juce_MPEMessages.cpp
  7. +1
    -1
      modules/juce_audio_basics/mpe/juce_MPENote.cpp
  8. +1
    -1
      modules/juce_audio_basics/mpe/juce_MPEValue.cpp
  9. +1
    -1
      modules/juce_audio_basics/mpe/juce_MPEZone.cpp
  10. +1
    -1
      modules/juce_audio_basics/mpe/juce_MPEZoneLayout.cpp
  11. +1
    -1
      modules/juce_audio_formats/codecs/juce_WavAudioFormat.cpp
  12. +1
    -1
      modules/juce_core/containers/juce_AbstractFifo.cpp
  13. +1
    -1
      modules/juce_core/containers/juce_HashMap_test.cpp
  14. +1
    -1
      modules/juce_core/containers/juce_ListenerList.cpp
  15. +1
    -1
      modules/juce_core/files/juce_File.cpp
  16. +1
    -1
      modules/juce_core/javascript/juce_JSON.cpp
  17. +1
    -1
      modules/juce_core/maths/juce_BigInteger.cpp
  18. +1
    -1
      modules/juce_core/maths/juce_Random.cpp
  19. +1
    -1
      modules/juce_core/misc/juce_StdFunctionCompat.cpp
  20. +1
    -1
      modules/juce_core/streams/juce_MemoryInputStream.cpp
  21. +1
    -1
      modules/juce_core/text/juce_Base64.cpp
  22. +1
    -1
      modules/juce_core/text/juce_String.cpp
  23. +1
    -1
      modules/juce_core/text/juce_TextDiff.cpp
  24. +1
    -1
      modules/juce_core/threads/juce_ChildProcess.cpp
  25. +2
    -2
      modules/juce_core/threads/juce_Thread.cpp
  26. +1
    -1
      modules/juce_core/time/juce_Time.cpp
  27. +32
    -2
      modules/juce_core/unit_tests/juce_UnitTest.cpp
  28. +20
    -2
      modules/juce_core/unit_tests/juce_UnitTest.h
  29. +1
    -1
      modules/juce_core/zip/juce_GZIPCompressorOutputStream.cpp
  30. +1
    -1
      modules/juce_cryptography/encryption/juce_BlowFish.cpp
  31. +1
    -1
      modules/juce_cryptography/hashing/juce_MD5.cpp
  32. +1
    -1
      modules/juce_cryptography/hashing/juce_SHA256.cpp
  33. +1
    -1
      modules/juce_cryptography/hashing/juce_Whirlpool.cpp
  34. +1
    -1
      modules/juce_data_structures/values/juce_CachedValue.cpp
  35. +1
    -1
      modules/juce_data_structures/values/juce_ValueTree.cpp
  36. +3
    -3
      modules/juce_osc/osc/juce_OSCAddress.cpp
  37. +1
    -1
      modules/juce_osc/osc/juce_OSCArgument.cpp
  38. +2
    -2
      modules/juce_osc/osc/juce_OSCBundle.cpp
  39. +1
    -1
      modules/juce_osc/osc/juce_OSCMessage.cpp
  40. +1
    -1
      modules/juce_osc/osc/juce_OSCReceiver.cpp
  41. +2
    -2
      modules/juce_osc/osc/juce_OSCSender.cpp
  42. +1
    -1
      modules/juce_osc/osc/juce_OSCTimeTag.cpp

+ 32
- 13
examples/Demo/Source/Demos/UnitTestsDemo.cpp View File

@@ -63,16 +63,21 @@ struct UnitTestClasses
private Timer
{
public:
TestRunnerThread (UnitTestsDemo& utd)
TestRunnerThread (UnitTestsDemo& utd, const String& ctg)
: Thread ("Unit Tests"),
owner (utd)
owner (utd),
category (ctg)
{
}
void run() override
{
CustomTestRunner runner (*this);
runner.runAllTests();
if (category == "All Tests")
runner.runAllTests();
else
runner.runTestsInCategory (category);
startTimer (50); // when finished, start the timer which will
// wait for the thread to end, then tell our component.
@@ -94,6 +99,7 @@ struct UnitTestClasses
private:
UnitTestsDemo& owner;
const String category;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (TestRunnerThread)
};
@@ -110,13 +116,22 @@ struct UnitTestClasses
setOpaque (true);
addAndMakeVisible (startTestButton);
startTestButton.addListener (this);
addAndMakeVisible (testResultsBox);
testResultsBox.setMultiLine (true);
testResultsBox.setFont (Font (Font::getDefaultMonospacedFontName(), 12.0f, Font::plain));
startTestButton.addListener (this);
addAndMakeVisible (categoriesBox);
categoriesBox.addItem ("All Tests", 1);
auto categories = UnitTest::getAllCategories();
categories.sort (true);
logMessage ("This panel runs all the built-in JUCE unit-tests.\n");
categoriesBox.addItemList (categories, 2);
categoriesBox.setSelectedId (1);
logMessage ("This panel runs the built-in JUCE unit-tests from the selected category.\n");
logMessage ("To add your own unit-tests, see the JUCE_UNIT_TESTS macro.");
}
@@ -134,26 +149,29 @@ struct UnitTestClasses
void resized() override
{
Rectangle<int> r (getLocalBounds().reduced (6));
auto bounds = getLocalBounds().reduced (6);
auto topSlice = bounds.removeFromTop (25);
startTestButton.setBounds (topSlice.removeFromLeft (200));
topSlice.removeFromLeft (10);
categoriesBox.setBounds (topSlice.removeFromLeft (250));
startTestButton.setBounds (r.removeFromTop (25).removeFromLeft (200));
testResultsBox.setBounds (r.withTrimmedTop (5));
bounds.removeFromTop (5);
testResultsBox.setBounds (bounds);
}
void buttonClicked (Button* buttonThatWasClicked) override
{
if (buttonThatWasClicked == &startTestButton)
{
startTest();
}
startTest (categoriesBox.getText());
}
void startTest()
void startTest (const String& category)
{
testResultsBox.clear();
startTestButton.setEnabled (false);
currentTestThread = new TestRunnerThread (*this);
currentTestThread = new TestRunnerThread (*this, category);
currentTestThread->startThread();
}
@@ -184,6 +202,7 @@ struct UnitTestClasses
ScopedPointer<TestRunnerThread> currentTestThread;
TextButton startTestButton;
ComboBox categoriesBox;
TextEditor testResultsBox;
void lookAndFeelChanged() override


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

@@ -475,7 +475,7 @@ void AudioDataConverters::deinterleaveSamples (const float* const source,
class AudioConversionTests : public UnitTest
{
public:
AudioConversionTests() : UnitTest ("Audio data conversion") {}
AudioConversionTests() : UnitTest ("Audio data conversion", "Audio") {}
template <class F1, class E1, class F2, class E2>
struct Test5


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

@@ -1016,7 +1016,7 @@ void JUCE_CALLTYPE FloatVectorOperations::disableDenormalisedNumberSupport() noe
class FloatVectorOperationsTests : public UnitTest
{
public:
FloatVectorOperationsTests() : UnitTest ("FloatVectorOperations") {}
FloatVectorOperationsTests() : UnitTest ("FloatVectorOperations", "Audio") {}
template <typename ValueType>
struct TestRunner


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

@@ -163,7 +163,7 @@ MidiBuffer MidiRPNGenerator::generate (int midiChannel,
class MidiRPNDetectorTests : public UnitTest
{
public:
MidiRPNDetectorTests() : UnitTest ("MidiRPNDetector class") {}
MidiRPNDetectorTests() : UnitTest ("MidiRPNDetector class", "MIDI/MPE") {}
void runTest() override
{
@@ -305,7 +305,7 @@ static MidiRPNDetectorTests MidiRPNDetectorUnitTests;
class MidiRPNGeneratorTests : public UnitTest
{
public:
MidiRPNGeneratorTests() : UnitTest ("MidiRPNGenerator class") {}
MidiRPNGeneratorTests() : UnitTest ("MidiRPNGenerator class", "MIDI/MPE") {}
void runTest() override
{


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

@@ -695,7 +695,7 @@ class MPEInstrumentTests : public UnitTest
{
public:
MPEInstrumentTests()
: UnitTest ("MPEInstrument class")
: UnitTest ("MPEInstrument class", "MIDI/MPE")
{
// using two MPE zones with the following layout for testing
//


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

@@ -71,7 +71,7 @@ MidiBuffer MPEMessages::setZoneLayout (const MPEZoneLayout& layout)
class MPEMessagesTests : public UnitTest
{
public:
MPEMessagesTests() : UnitTest ("MPEMessages class") {}
MPEMessagesTests() : UnitTest ("MPEMessages class", "MIDI/MPE") {}
void runTest() override
{


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

@@ -99,7 +99,7 @@ bool MPENote::operator!= (const MPENote& other) const noexcept
class MPENoteTests : public UnitTest
{
public:
MPENoteTests() : UnitTest ("MPENote class") {}
MPENoteTests() : UnitTest ("MPENote class", "MIDI/MPE") {}
//==============================================================================
void runTest() override


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

@@ -89,7 +89,7 @@ bool MPEValue::operator!= (const MPEValue& other) const noexcept
class MPEValueTests : public UnitTest
{
public:
MPEValueTests() : UnitTest ("MPEValue class") {}
MPEValueTests() : UnitTest ("MPEValue class", "MIDI/MPE") {}
void runTest() override
{


+ 1
- 1
modules/juce_audio_basics/mpe/juce_MPEZone.cpp View File

@@ -163,7 +163,7 @@ bool MPEZone::operator!= (const MPEZone& other) const noexcept
class MPEZoneTests : public UnitTest
{
public:
MPEZoneTests() : UnitTest ("MPEZone class") {}
MPEZoneTests() : UnitTest ("MPEZone class", "MIDI/MPE") {}
void runTest() override
{


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

@@ -204,7 +204,7 @@ void MPEZoneLayout::removeListener (Listener* const listenerToRemove) noexcept
class MPEZoneLayoutTests : public UnitTest
{
public:
MPEZoneLayoutTests() : UnitTest ("MPEZoneLayout class") {}
MPEZoneLayoutTests() : UnitTest ("MPEZoneLayout class", "MIDI/MPE") {}
void runTest() override
{


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

@@ -1691,7 +1691,7 @@ bool WavAudioFormat::replaceMetadataInFile (const File& wavFile, const StringPai
struct WaveAudioFormatTests : public UnitTest
{
WaveAudioFormatTests() : UnitTest ("Wave audio format tests") {}
WaveAudioFormatTests() : UnitTest ("Wave audio format tests", "Audio") {}
void runTest() override
{


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

@@ -130,7 +130,7 @@ void AbstractFifo::finishedRead (int numRead) noexcept
class AbstractFifoTests : public UnitTest
{
public:
AbstractFifoTests() : UnitTest ("Abstract Fifo") {}
AbstractFifoTests() : UnitTest ("Abstract Fifo", "Containers") {}
class WriteThread : public Thread
{


+ 1
- 1
modules/juce_core/containers/juce_HashMap_test.cpp View File

@@ -22,7 +22,7 @@
struct HashMapTest : public UnitTest
{
HashMapTest() : UnitTest ("HashMap") {}
HashMapTest() : UnitTest ("HashMap", "Containers") {}
void runTest() override
{


+ 1
- 1
modules/juce_core/containers/juce_ListenerList.cpp View File

@@ -76,7 +76,7 @@ struct Listener2 : public ListenerBase
class ListenerListTests : public UnitTest
{
public:
ListenerListTests() : UnitTest ("ListenerList") {}
ListenerListTests() : UnitTest ("ListenerList", "Containers") {}
template <typename... Args>
void callHelper (std::vector<int>& expectedCounterValues)


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

@@ -1004,7 +1004,7 @@ MemoryMappedFile::MemoryMappedFile (const File& file, const Range<int64>& fileRa
class FileTests : public UnitTest
{
public:
FileTests() : UnitTest ("Files") {}
FileTests() : UnitTest ("Files", "Files") {}
void runTest() override
{


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

@@ -529,7 +529,7 @@ Result JSON::parseQuotedString (String::CharPointerType& t, var& result)
class JSONTests : public UnitTest
{
public:
JSONTests() : UnitTest ("JSON") {}
JSONTests() : UnitTest ("JSON", "JSON") {}
static String createRandomWideCharString (Random& r)
{


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

@@ -1291,7 +1291,7 @@ uint32 readLittleEndianBitsInBuffer (const void* buffer, uint32 startBit, uint32
class BigIntegerTests : public UnitTest
{
public:
BigIntegerTests() : UnitTest ("BigInteger") {}
BigIntegerTests() : UnitTest ("BigInteger", "Maths") {}
static BigInteger getBigRandom (Random& r)
{


+ 1
- 1
modules/juce_core/maths/juce_Random.cpp View File

@@ -154,7 +154,7 @@ void Random::fillBitsRandomly (BigInteger& arrayToChange, int startBit, int numB
class RandomTests : public UnitTest
{
public:
RandomTests() : UnitTest ("Random") {}
RandomTests() : UnitTest ("Random", "Maths") {}
void runTest() override
{


+ 1
- 1
modules/juce_core/misc/juce_StdFunctionCompat.cpp View File

@@ -75,7 +75,7 @@ namespace FunctionTestsHelpers
class FunctionTests : public UnitTest
{
public:
FunctionTests() : UnitTest ("Function") {}
FunctionTests() : UnitTest ("Function", "Function") {}
void runTest() override
{


+ 1
- 1
modules/juce_core/streams/juce_MemoryInputStream.cpp View File

@@ -98,7 +98,7 @@ int64 MemoryInputStream::getPosition()
class MemoryStreamTests : public UnitTest
{
public:
MemoryStreamTests() : UnitTest ("MemoryInputStream & MemoryOutputStream") {}
MemoryStreamTests() : UnitTest ("MemoryInputStream & MemoryOutputStream", "Memory Streams") {}
void runTest() override
{


+ 1
- 1
modules/juce_core/text/juce_Base64.cpp View File

@@ -124,7 +124,7 @@ String Base64::toBase64 (const String& text)
class Base64Tests : public UnitTest
{
public:
Base64Tests() : UnitTest ("Base64 class") {}
Base64Tests() : UnitTest ("Base64 class", "Text") {}
static MemoryBlock createRandomData (Random& r)
{


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

@@ -2223,7 +2223,7 @@ StringRef::StringRef (const String& string) noexcept : text (string.getCharPoin
class StringTests : public UnitTest
{
public:
StringTests() : UnitTest ("String class") {}
StringTests() : UnitTest ("String class", "Text") {}
template <class CharPointerType>
struct TestUTFConversion


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

@@ -220,7 +220,7 @@ String TextDiff::Change::appliedTo (const String& text) const noexcept
class DiffTests : public UnitTest
{
public:
DiffTests() : UnitTest ("TextDiff class") {}
DiffTests() : UnitTest ("TextDiff class", "Text") {}
static String createString (Random& r)
{


+ 1
- 1
modules/juce_core/threads/juce_ChildProcess.cpp View File

@@ -81,7 +81,7 @@ String ChildProcess::readAllProcessOutput()
class ChildProcessTests : public UnitTest
{
public:
ChildProcessTests() : UnitTest ("ChildProcess") {}
ChildProcessTests() : UnitTest ("ChildProcess", "Threads") {}
void runTest() override
{


+ 2
- 2
modules/juce_core/threads/juce_Thread.cpp View File

@@ -299,7 +299,7 @@ bool JUCE_CALLTYPE Process::isRunningUnderDebugger() noexcept
class AtomicTests : public UnitTest
{
public:
AtomicTests() : UnitTest ("Atomics") {}
AtomicTests() : UnitTest ("Atomics", "Threads") {}
void runTest() override
{
@@ -422,7 +422,7 @@ class ThreadLocalValueUnitTest : public UnitTest, private Thread
{
public:
ThreadLocalValueUnitTest()
: UnitTest ("ThreadLocalValue"),
: UnitTest ("ThreadLocalValue", "Threads"),
Thread ("ThreadLocalValue Thread")
{}


+ 1
- 1
modules/juce_core/time/juce_Time.cpp View File

@@ -628,7 +628,7 @@ Time Time::getCompilationDate()
class TimeTests : public UnitTest
{
public:
TimeTests() : UnitTest ("Time") {}
TimeTests() : UnitTest ("Time", "Time") {}
void runTest() override
{


+ 32
- 2
modules/juce_core/unit_tests/juce_UnitTest.cpp View File

@@ -20,8 +20,8 @@
==============================================================================
*/
UnitTest::UnitTest (const String& nm)
: name (nm), runner (nullptr)
UnitTest::UnitTest (const String& nm, const String& ctg)
: name (nm), category (ctg), runner (nullptr)
{
getAllTests().add (this);
}
@@ -37,6 +37,31 @@ Array<UnitTest*>& UnitTest::getAllTests()
return tests;
}
Array<UnitTest*> UnitTest::getTestsInCategory (const String& category)
{
if (category.isEmpty())
return getAllTests();
Array<UnitTest*> unitTests;
for (auto* test : getAllTests())
if (test->getCategory() == category)
unitTests.add (test);
return unitTests;
}
StringArray UnitTest::getAllCategories()
{
StringArray categories;
for (auto* test : getAllTests())
if (test->getCategory().isNotEmpty())
categories.addIfNotAlreadyThere (test->getCategory());
return categories;
}
void UnitTest::initialise() {}
void UnitTest::shutdown() {}
@@ -159,6 +184,11 @@ void UnitTestRunner::runAllTests (int64 randomSeed)
runTests (UnitTest::getAllTests(), randomSeed);
}
void UnitTestRunner::runTestsInCategory (const String& category, int64 randomSeed)
{
runTests (UnitTest::getTestsInCategory (category), randomSeed);
}
void UnitTestRunner::logMessage (const String& message)
{
Logger::writeToLog (message);


+ 20
- 2
modules/juce_core/unit_tests/juce_UnitTest.h View File

@@ -67,8 +67,8 @@ class JUCE_API UnitTest
{
public:
//==============================================================================
/** Creates a test with the given name. */
explicit UnitTest (const String& name);
/** Creates a test with the given name and optionally places it in a category. */
explicit UnitTest (const String& name, const String& category = String());
/** Destructor. */
virtual ~UnitTest();
@@ -76,6 +76,9 @@ public:
/** Returns the name of the test. */
const String& getName() const noexcept { return name; }
/** Returns the category of the test. */
const String& getCategory() const noexcept { return category; }
/** Runs the test, using the specified UnitTestRunner.
You shouldn't need to call this method directly - use
UnitTestRunner::runTests() instead.
@@ -85,6 +88,12 @@ public:
/** Returns the set of all UnitTest objects that currently exist. */
static Array<UnitTest*>& getAllTests();
/** Returns the set of UnitTests in a specified category. */
static Array<UnitTest*> getTestsInCategory (const String& category);
/** Returns a StringArray containing all of the categories of UnitTests that have been registered. */
static StringArray getAllCategories();
//==============================================================================
/** You can optionally implement this method to set up your test.
This method will be called before runTest().
@@ -289,6 +298,7 @@ private:
//==============================================================================
const String name;
const String category;
UnitTestRunner* runner;
JUCE_DECLARE_NON_COPYABLE (UnitTest)
@@ -335,6 +345,14 @@ public:
*/
void runAllTests (int64 randomSeed = 0);
/** Runs all the UnitTest objects within a specified category.
This calls runTests() for all the objects listed in UnitTest::getTestsInCategory().
If you want to run the tests with a predetermined seed, you can pass that into
the randomSeed argument, or pass 0 to have a randomly-generated seed chosen.
*/
void runTestsInCategory (const String& category, int64 randomSeed = 0);
/** Sets a flag to indicate whether an assertion should be triggered if a test fails.
This is true by default.
*/


+ 1
- 1
modules/juce_core/zip/juce_GZIPCompressorOutputStream.cpp View File

@@ -158,7 +158,7 @@ bool GZIPCompressorOutputStream::setPosition (int64 /*newPosition*/)
class GZIPTests : public UnitTest
{
public:
GZIPTests() : UnitTest ("GZIP") {}
GZIPTests() : UnitTest ("GZIP", "Compression") {}
void runTest() override
{


+ 1
- 1
modules/juce_cryptography/encryption/juce_BlowFish.cpp View File

@@ -368,7 +368,7 @@ int BlowFish::unpad (const void* data, size_t size) noexcept
class BlowFishTests : public UnitTest
{
public:
BlowFishTests() : UnitTest ("BlowFish") {}
BlowFishTests() : UnitTest ("BlowFish", "Cryptography") {}
static void fillMemoryBlockWithRandomData (MemoryBlock& block, Random& random)
{


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

@@ -307,7 +307,7 @@ bool MD5::operator!= (const MD5& other) const noexcept { return ! operator== (
class MD5Tests : public UnitTest
{
public:
MD5Tests() : UnitTest ("MD5") {}
MD5Tests() : UnitTest ("MD5", "Cryptography") {}
void test (const char* input, const char* expected)
{


+ 1
- 1
modules/juce_cryptography/hashing/juce_SHA256.cpp View File

@@ -240,7 +240,7 @@ bool SHA256::operator!= (const SHA256& other) const noexcept { return ! operato
class SHA256Tests : public UnitTest
{
public:
SHA256Tests() : UnitTest ("SHA-256") {}
SHA256Tests() : UnitTest ("SHA-256", "Cryptography") {}
void test (const char* input, const char* expected)
{


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

@@ -626,7 +626,7 @@ bool Whirlpool::operator!= (const Whirlpool& other) const noexcept { return ! o
class WhirlpoolTests : public UnitTest
{
public:
WhirlpoolTests() : UnitTest ("Whirlpool") {}
WhirlpoolTests() : UnitTest ("Whirlpool", "Cryptography") {}
void test (const char* input, const char* expected)
{


+ 1
- 1
modules/juce_data_structures/values/juce_CachedValue.cpp View File

@@ -29,7 +29,7 @@
class CachedValueTests : public UnitTest
{
public:
CachedValueTests() : UnitTest ("CachedValues") {}
CachedValueTests() : UnitTest ("CachedValues", "Values") {}
void runTest() override
{


+ 1
- 1
modules/juce_data_structures/values/juce_ValueTree.cpp View File

@@ -1057,7 +1057,7 @@ void ValueTree::Listener::valueTreeRedirected (ValueTree&) {}
class ValueTreeTests : public UnitTest
{
public:
ValueTreeTests() : UnitTest ("ValueTrees") {}
ValueTreeTests() : UnitTest ("ValueTrees", "Values") {}
static String createRandomIdentifier (Random& r)
{


+ 3
- 3
modules/juce_osc/osc/juce_OSCAddress.cpp View File

@@ -397,7 +397,7 @@ String OSCAddressPattern::toString() const noexcept
class OSCAddressTests : public UnitTest
{
public:
OSCAddressTests() : UnitTest ("OSCAddress class") {}
OSCAddressTests() : UnitTest ("OSCAddress class", "OSC") {}
void runTest()
{
@@ -441,7 +441,7 @@ static OSCAddressTests OSCAddressUnitTests;
class OSCAddressPatternTests : public UnitTest
{
public:
OSCAddressPatternTests() : UnitTest ("OSCAddressPattern class") {}
OSCAddressPatternTests() : UnitTest ("OSCAddressPattern class", "OSC") {}
void runTest()
{
@@ -580,7 +580,7 @@ static OSCAddressPatternTests OSCAddressPatternUnitTests;
class OSCPatternMatcherTests : public UnitTest
{
public:
OSCPatternMatcherTests() : UnitTest ("OSCAddress class / pattern matching") {}
OSCPatternMatcherTests() : UnitTest ("OSCAddress class / pattern matching", "OSC") {}
void runTest()
{


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

@@ -88,7 +88,7 @@ const MemoryBlock& OSCArgument::getBlob() const noexcept
class OSCArgumentTests : public UnitTest
{
public:
OSCArgumentTests() : UnitTest ("OSCArgument class") {}
OSCArgumentTests() : UnitTest ("OSCArgument class", "OSC") {}
MemoryBlock getMemoryBlockWithRandomData (size_t numBytes)


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

@@ -111,7 +111,7 @@ const OSCBundle& OSCBundle::Element::getBundle() const
class OSCBundleTests : public UnitTest
{
public:
OSCBundleTests() : UnitTest ("OSCBundle class") {}
OSCBundleTests() : UnitTest ("OSCBundle class", "OSC") {}
void runTest()
{
@@ -214,7 +214,7 @@ static OSCBundleTests OSCBundleUnitTests;
class OSCBundleElementTests : public UnitTest
{
public:
OSCBundleElementTests() : UnitTest ("OSCBundle::Element class") {}
OSCBundleElementTests() : UnitTest ("OSCBundle::Element class", "OSC") {}
void runTest()
{


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

@@ -85,7 +85,7 @@ void OSCMessage::addArgument (OSCArgument arg) { arguments.add (arg); }
class OSCMessageTests : public UnitTest
{
public:
OSCMessageTests() : UnitTest ("OSCMessage class") {}
OSCMessageTests() : UnitTest ("OSCMessage class", "OSC") {}
void runTest()
{


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

@@ -635,7 +635,7 @@ void OSCReceiver::registerFormatErrorHandler (FormatErrorHandler handler)
class OSCInputStreamTests : public UnitTest
{
public:
OSCInputStreamTests() : UnitTest ("OSCInputStream class") {}
OSCInputStreamTests() : UnitTest ("OSCInputStream class", "OSC") {}
void runTest()
{


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

@@ -314,7 +314,7 @@ bool OSCSender::sendToIPAddress (const String& host, int port, const OSCBundle&
class OSCBinaryWriterTests : public UnitTest
{
public:
OSCBinaryWriterTests() : UnitTest ("OSCBinaryWriter class") {}
OSCBinaryWriterTests() : UnitTest ("OSCBinaryWriter class", "OSC") {}
void runTest()
{
@@ -641,7 +641,7 @@ static OSCBinaryWriterTests OSCBinaryWriterUnitTests;
class OSCRoundTripTests : public UnitTest
{
public:
OSCRoundTripTests() : UnitTest ("OSCRoundTripTests class") {}
OSCRoundTripTests() : UnitTest ("OSCRoundTripTests class", "OSC") {}
void runTest()
{


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

@@ -80,7 +80,7 @@ bool OSCTimeTag::isImmediately() const noexcept
class OSCTimeTagTests : public UnitTest
{
public:
OSCTimeTagTests() : UnitTest ("OSCTimeTag class") {}
OSCTimeTagTests() : UnitTest ("OSCTimeTag class", "OSC") {}
void runTest()
{


Loading…
Cancel
Save