| @@ -63,16 +63,21 @@ struct UnitTestClasses | |||||
| private Timer | private Timer | ||||
| { | { | ||||
| public: | public: | ||||
| TestRunnerThread (UnitTestsDemo& utd) | |||||
| TestRunnerThread (UnitTestsDemo& utd, const String& ctg) | |||||
| : Thread ("Unit Tests"), | : Thread ("Unit Tests"), | ||||
| owner (utd) | |||||
| owner (utd), | |||||
| category (ctg) | |||||
| { | { | ||||
| } | } | ||||
| void run() override | void run() override | ||||
| { | { | ||||
| CustomTestRunner runner (*this); | CustomTestRunner runner (*this); | ||||
| runner.runAllTests(); | |||||
| if (category == "All Tests") | |||||
| runner.runAllTests(); | |||||
| else | |||||
| runner.runTestsInCategory (category); | |||||
| startTimer (50); // when finished, start the timer which will | startTimer (50); // when finished, start the timer which will | ||||
| // wait for the thread to end, then tell our component. | // wait for the thread to end, then tell our component. | ||||
| @@ -94,6 +99,7 @@ struct UnitTestClasses | |||||
| private: | private: | ||||
| UnitTestsDemo& owner; | UnitTestsDemo& owner; | ||||
| const String category; | |||||
| JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (TestRunnerThread) | JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (TestRunnerThread) | ||||
| }; | }; | ||||
| @@ -110,13 +116,22 @@ struct UnitTestClasses | |||||
| setOpaque (true); | setOpaque (true); | ||||
| addAndMakeVisible (startTestButton); | addAndMakeVisible (startTestButton); | ||||
| startTestButton.addListener (this); | |||||
| addAndMakeVisible (testResultsBox); | addAndMakeVisible (testResultsBox); | ||||
| testResultsBox.setMultiLine (true); | testResultsBox.setMultiLine (true); | ||||
| testResultsBox.setFont (Font (Font::getDefaultMonospacedFontName(), 12.0f, Font::plain)); | 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."); | logMessage ("To add your own unit-tests, see the JUCE_UNIT_TESTS macro."); | ||||
| } | } | ||||
| @@ -134,26 +149,29 @@ struct UnitTestClasses | |||||
| void resized() override | 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 | void buttonClicked (Button* buttonThatWasClicked) override | ||||
| { | { | ||||
| if (buttonThatWasClicked == &startTestButton) | if (buttonThatWasClicked == &startTestButton) | ||||
| { | |||||
| startTest(); | |||||
| } | |||||
| startTest (categoriesBox.getText()); | |||||
| } | } | ||||
| void startTest() | |||||
| void startTest (const String& category) | |||||
| { | { | ||||
| testResultsBox.clear(); | testResultsBox.clear(); | ||||
| startTestButton.setEnabled (false); | startTestButton.setEnabled (false); | ||||
| currentTestThread = new TestRunnerThread (*this); | |||||
| currentTestThread = new TestRunnerThread (*this, category); | |||||
| currentTestThread->startThread(); | currentTestThread->startThread(); | ||||
| } | } | ||||
| @@ -184,6 +202,7 @@ struct UnitTestClasses | |||||
| ScopedPointer<TestRunnerThread> currentTestThread; | ScopedPointer<TestRunnerThread> currentTestThread; | ||||
| TextButton startTestButton; | TextButton startTestButton; | ||||
| ComboBox categoriesBox; | |||||
| TextEditor testResultsBox; | TextEditor testResultsBox; | ||||
| void lookAndFeelChanged() override | void lookAndFeelChanged() override | ||||
| @@ -475,7 +475,7 @@ void AudioDataConverters::deinterleaveSamples (const float* const source, | |||||
| class AudioConversionTests : public UnitTest | class AudioConversionTests : public UnitTest | ||||
| { | { | ||||
| public: | public: | ||||
| AudioConversionTests() : UnitTest ("Audio data conversion") {} | |||||
| AudioConversionTests() : UnitTest ("Audio data conversion", "Audio") {} | |||||
| template <class F1, class E1, class F2, class E2> | template <class F1, class E1, class F2, class E2> | ||||
| struct Test5 | struct Test5 | ||||
| @@ -1016,7 +1016,7 @@ void JUCE_CALLTYPE FloatVectorOperations::disableDenormalisedNumberSupport() noe | |||||
| class FloatVectorOperationsTests : public UnitTest | class FloatVectorOperationsTests : public UnitTest | ||||
| { | { | ||||
| public: | public: | ||||
| FloatVectorOperationsTests() : UnitTest ("FloatVectorOperations") {} | |||||
| FloatVectorOperationsTests() : UnitTest ("FloatVectorOperations", "Audio") {} | |||||
| template <typename ValueType> | template <typename ValueType> | ||||
| struct TestRunner | struct TestRunner | ||||
| @@ -163,7 +163,7 @@ MidiBuffer MidiRPNGenerator::generate (int midiChannel, | |||||
| class MidiRPNDetectorTests : public UnitTest | class MidiRPNDetectorTests : public UnitTest | ||||
| { | { | ||||
| public: | public: | ||||
| MidiRPNDetectorTests() : UnitTest ("MidiRPNDetector class") {} | |||||
| MidiRPNDetectorTests() : UnitTest ("MidiRPNDetector class", "MIDI/MPE") {} | |||||
| void runTest() override | void runTest() override | ||||
| { | { | ||||
| @@ -305,7 +305,7 @@ static MidiRPNDetectorTests MidiRPNDetectorUnitTests; | |||||
| class MidiRPNGeneratorTests : public UnitTest | class MidiRPNGeneratorTests : public UnitTest | ||||
| { | { | ||||
| public: | public: | ||||
| MidiRPNGeneratorTests() : UnitTest ("MidiRPNGenerator class") {} | |||||
| MidiRPNGeneratorTests() : UnitTest ("MidiRPNGenerator class", "MIDI/MPE") {} | |||||
| void runTest() override | void runTest() override | ||||
| { | { | ||||
| @@ -695,7 +695,7 @@ class MPEInstrumentTests : public UnitTest | |||||
| { | { | ||||
| public: | public: | ||||
| MPEInstrumentTests() | MPEInstrumentTests() | ||||
| : UnitTest ("MPEInstrument class") | |||||
| : UnitTest ("MPEInstrument class", "MIDI/MPE") | |||||
| { | { | ||||
| // using two MPE zones with the following layout for testing | // using two MPE zones with the following layout for testing | ||||
| // | // | ||||
| @@ -71,7 +71,7 @@ MidiBuffer MPEMessages::setZoneLayout (const MPEZoneLayout& layout) | |||||
| class MPEMessagesTests : public UnitTest | class MPEMessagesTests : public UnitTest | ||||
| { | { | ||||
| public: | public: | ||||
| MPEMessagesTests() : UnitTest ("MPEMessages class") {} | |||||
| MPEMessagesTests() : UnitTest ("MPEMessages class", "MIDI/MPE") {} | |||||
| void runTest() override | void runTest() override | ||||
| { | { | ||||
| @@ -99,7 +99,7 @@ bool MPENote::operator!= (const MPENote& other) const noexcept | |||||
| class MPENoteTests : public UnitTest | class MPENoteTests : public UnitTest | ||||
| { | { | ||||
| public: | public: | ||||
| MPENoteTests() : UnitTest ("MPENote class") {} | |||||
| MPENoteTests() : UnitTest ("MPENote class", "MIDI/MPE") {} | |||||
| //============================================================================== | //============================================================================== | ||||
| void runTest() override | void runTest() override | ||||
| @@ -89,7 +89,7 @@ bool MPEValue::operator!= (const MPEValue& other) const noexcept | |||||
| class MPEValueTests : public UnitTest | class MPEValueTests : public UnitTest | ||||
| { | { | ||||
| public: | public: | ||||
| MPEValueTests() : UnitTest ("MPEValue class") {} | |||||
| MPEValueTests() : UnitTest ("MPEValue class", "MIDI/MPE") {} | |||||
| void runTest() override | void runTest() override | ||||
| { | { | ||||
| @@ -163,7 +163,7 @@ bool MPEZone::operator!= (const MPEZone& other) const noexcept | |||||
| class MPEZoneTests : public UnitTest | class MPEZoneTests : public UnitTest | ||||
| { | { | ||||
| public: | public: | ||||
| MPEZoneTests() : UnitTest ("MPEZone class") {} | |||||
| MPEZoneTests() : UnitTest ("MPEZone class", "MIDI/MPE") {} | |||||
| void runTest() override | void runTest() override | ||||
| { | { | ||||
| @@ -204,7 +204,7 @@ void MPEZoneLayout::removeListener (Listener* const listenerToRemove) noexcept | |||||
| class MPEZoneLayoutTests : public UnitTest | class MPEZoneLayoutTests : public UnitTest | ||||
| { | { | ||||
| public: | public: | ||||
| MPEZoneLayoutTests() : UnitTest ("MPEZoneLayout class") {} | |||||
| MPEZoneLayoutTests() : UnitTest ("MPEZoneLayout class", "MIDI/MPE") {} | |||||
| void runTest() override | void runTest() override | ||||
| { | { | ||||
| @@ -1691,7 +1691,7 @@ bool WavAudioFormat::replaceMetadataInFile (const File& wavFile, const StringPai | |||||
| struct WaveAudioFormatTests : public UnitTest | struct WaveAudioFormatTests : public UnitTest | ||||
| { | { | ||||
| WaveAudioFormatTests() : UnitTest ("Wave audio format tests") {} | |||||
| WaveAudioFormatTests() : UnitTest ("Wave audio format tests", "Audio") {} | |||||
| void runTest() override | void runTest() override | ||||
| { | { | ||||
| @@ -130,7 +130,7 @@ void AbstractFifo::finishedRead (int numRead) noexcept | |||||
| class AbstractFifoTests : public UnitTest | class AbstractFifoTests : public UnitTest | ||||
| { | { | ||||
| public: | public: | ||||
| AbstractFifoTests() : UnitTest ("Abstract Fifo") {} | |||||
| AbstractFifoTests() : UnitTest ("Abstract Fifo", "Containers") {} | |||||
| class WriteThread : public Thread | class WriteThread : public Thread | ||||
| { | { | ||||
| @@ -22,7 +22,7 @@ | |||||
| struct HashMapTest : public UnitTest | struct HashMapTest : public UnitTest | ||||
| { | { | ||||
| HashMapTest() : UnitTest ("HashMap") {} | |||||
| HashMapTest() : UnitTest ("HashMap", "Containers") {} | |||||
| void runTest() override | void runTest() override | ||||
| { | { | ||||
| @@ -76,7 +76,7 @@ struct Listener2 : public ListenerBase | |||||
| class ListenerListTests : public UnitTest | class ListenerListTests : public UnitTest | ||||
| { | { | ||||
| public: | public: | ||||
| ListenerListTests() : UnitTest ("ListenerList") {} | |||||
| ListenerListTests() : UnitTest ("ListenerList", "Containers") {} | |||||
| template <typename... Args> | template <typename... Args> | ||||
| void callHelper (std::vector<int>& expectedCounterValues) | void callHelper (std::vector<int>& expectedCounterValues) | ||||
| @@ -1004,7 +1004,7 @@ MemoryMappedFile::MemoryMappedFile (const File& file, const Range<int64>& fileRa | |||||
| class FileTests : public UnitTest | class FileTests : public UnitTest | ||||
| { | { | ||||
| public: | public: | ||||
| FileTests() : UnitTest ("Files") {} | |||||
| FileTests() : UnitTest ("Files", "Files") {} | |||||
| void runTest() override | void runTest() override | ||||
| { | { | ||||
| @@ -529,7 +529,7 @@ Result JSON::parseQuotedString (String::CharPointerType& t, var& result) | |||||
| class JSONTests : public UnitTest | class JSONTests : public UnitTest | ||||
| { | { | ||||
| public: | public: | ||||
| JSONTests() : UnitTest ("JSON") {} | |||||
| JSONTests() : UnitTest ("JSON", "JSON") {} | |||||
| static String createRandomWideCharString (Random& r) | static String createRandomWideCharString (Random& r) | ||||
| { | { | ||||
| @@ -1291,7 +1291,7 @@ uint32 readLittleEndianBitsInBuffer (const void* buffer, uint32 startBit, uint32 | |||||
| class BigIntegerTests : public UnitTest | class BigIntegerTests : public UnitTest | ||||
| { | { | ||||
| public: | public: | ||||
| BigIntegerTests() : UnitTest ("BigInteger") {} | |||||
| BigIntegerTests() : UnitTest ("BigInteger", "Maths") {} | |||||
| static BigInteger getBigRandom (Random& r) | static BigInteger getBigRandom (Random& r) | ||||
| { | { | ||||
| @@ -154,7 +154,7 @@ void Random::fillBitsRandomly (BigInteger& arrayToChange, int startBit, int numB | |||||
| class RandomTests : public UnitTest | class RandomTests : public UnitTest | ||||
| { | { | ||||
| public: | public: | ||||
| RandomTests() : UnitTest ("Random") {} | |||||
| RandomTests() : UnitTest ("Random", "Maths") {} | |||||
| void runTest() override | void runTest() override | ||||
| { | { | ||||
| @@ -75,7 +75,7 @@ namespace FunctionTestsHelpers | |||||
| class FunctionTests : public UnitTest | class FunctionTests : public UnitTest | ||||
| { | { | ||||
| public: | public: | ||||
| FunctionTests() : UnitTest ("Function") {} | |||||
| FunctionTests() : UnitTest ("Function", "Function") {} | |||||
| void runTest() override | void runTest() override | ||||
| { | { | ||||
| @@ -98,7 +98,7 @@ int64 MemoryInputStream::getPosition() | |||||
| class MemoryStreamTests : public UnitTest | class MemoryStreamTests : public UnitTest | ||||
| { | { | ||||
| public: | public: | ||||
| MemoryStreamTests() : UnitTest ("MemoryInputStream & MemoryOutputStream") {} | |||||
| MemoryStreamTests() : UnitTest ("MemoryInputStream & MemoryOutputStream", "Memory Streams") {} | |||||
| void runTest() override | void runTest() override | ||||
| { | { | ||||
| @@ -124,7 +124,7 @@ String Base64::toBase64 (const String& text) | |||||
| class Base64Tests : public UnitTest | class Base64Tests : public UnitTest | ||||
| { | { | ||||
| public: | public: | ||||
| Base64Tests() : UnitTest ("Base64 class") {} | |||||
| Base64Tests() : UnitTest ("Base64 class", "Text") {} | |||||
| static MemoryBlock createRandomData (Random& r) | static MemoryBlock createRandomData (Random& r) | ||||
| { | { | ||||
| @@ -2223,7 +2223,7 @@ StringRef::StringRef (const String& string) noexcept : text (string.getCharPoin | |||||
| class StringTests : public UnitTest | class StringTests : public UnitTest | ||||
| { | { | ||||
| public: | public: | ||||
| StringTests() : UnitTest ("String class") {} | |||||
| StringTests() : UnitTest ("String class", "Text") {} | |||||
| template <class CharPointerType> | template <class CharPointerType> | ||||
| struct TestUTFConversion | struct TestUTFConversion | ||||
| @@ -220,7 +220,7 @@ String TextDiff::Change::appliedTo (const String& text) const noexcept | |||||
| class DiffTests : public UnitTest | class DiffTests : public UnitTest | ||||
| { | { | ||||
| public: | public: | ||||
| DiffTests() : UnitTest ("TextDiff class") {} | |||||
| DiffTests() : UnitTest ("TextDiff class", "Text") {} | |||||
| static String createString (Random& r) | static String createString (Random& r) | ||||
| { | { | ||||
| @@ -81,7 +81,7 @@ String ChildProcess::readAllProcessOutput() | |||||
| class ChildProcessTests : public UnitTest | class ChildProcessTests : public UnitTest | ||||
| { | { | ||||
| public: | public: | ||||
| ChildProcessTests() : UnitTest ("ChildProcess") {} | |||||
| ChildProcessTests() : UnitTest ("ChildProcess", "Threads") {} | |||||
| void runTest() override | void runTest() override | ||||
| { | { | ||||
| @@ -299,7 +299,7 @@ bool JUCE_CALLTYPE Process::isRunningUnderDebugger() noexcept | |||||
| class AtomicTests : public UnitTest | class AtomicTests : public UnitTest | ||||
| { | { | ||||
| public: | public: | ||||
| AtomicTests() : UnitTest ("Atomics") {} | |||||
| AtomicTests() : UnitTest ("Atomics", "Threads") {} | |||||
| void runTest() override | void runTest() override | ||||
| { | { | ||||
| @@ -422,7 +422,7 @@ class ThreadLocalValueUnitTest : public UnitTest, private Thread | |||||
| { | { | ||||
| public: | public: | ||||
| ThreadLocalValueUnitTest() | ThreadLocalValueUnitTest() | ||||
| : UnitTest ("ThreadLocalValue"), | |||||
| : UnitTest ("ThreadLocalValue", "Threads"), | |||||
| Thread ("ThreadLocalValue Thread") | Thread ("ThreadLocalValue Thread") | ||||
| {} | {} | ||||
| @@ -628,7 +628,7 @@ Time Time::getCompilationDate() | |||||
| class TimeTests : public UnitTest | class TimeTests : public UnitTest | ||||
| { | { | ||||
| public: | public: | ||||
| TimeTests() : UnitTest ("Time") {} | |||||
| TimeTests() : UnitTest ("Time", "Time") {} | |||||
| void runTest() override | void runTest() override | ||||
| { | { | ||||
| @@ -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); | getAllTests().add (this); | ||||
| } | } | ||||
| @@ -37,6 +37,31 @@ Array<UnitTest*>& UnitTest::getAllTests() | |||||
| return tests; | 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::initialise() {} | ||||
| void UnitTest::shutdown() {} | void UnitTest::shutdown() {} | ||||
| @@ -159,6 +184,11 @@ void UnitTestRunner::runAllTests (int64 randomSeed) | |||||
| runTests (UnitTest::getAllTests(), randomSeed); | runTests (UnitTest::getAllTests(), randomSeed); | ||||
| } | } | ||||
| void UnitTestRunner::runTestsInCategory (const String& category, int64 randomSeed) | |||||
| { | |||||
| runTests (UnitTest::getTestsInCategory (category), randomSeed); | |||||
| } | |||||
| void UnitTestRunner::logMessage (const String& message) | void UnitTestRunner::logMessage (const String& message) | ||||
| { | { | ||||
| Logger::writeToLog (message); | Logger::writeToLog (message); | ||||
| @@ -67,8 +67,8 @@ class JUCE_API UnitTest | |||||
| { | { | ||||
| public: | 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. */ | /** Destructor. */ | ||||
| virtual ~UnitTest(); | virtual ~UnitTest(); | ||||
| @@ -76,6 +76,9 @@ public: | |||||
| /** Returns the name of the test. */ | /** Returns the name of the test. */ | ||||
| const String& getName() const noexcept { return name; } | 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. | /** Runs the test, using the specified UnitTestRunner. | ||||
| You shouldn't need to call this method directly - use | You shouldn't need to call this method directly - use | ||||
| UnitTestRunner::runTests() instead. | UnitTestRunner::runTests() instead. | ||||
| @@ -85,6 +88,12 @@ public: | |||||
| /** Returns the set of all UnitTest objects that currently exist. */ | /** Returns the set of all UnitTest objects that currently exist. */ | ||||
| static Array<UnitTest*>& getAllTests(); | 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. | /** You can optionally implement this method to set up your test. | ||||
| This method will be called before runTest(). | This method will be called before runTest(). | ||||
| @@ -289,6 +298,7 @@ private: | |||||
| //============================================================================== | //============================================================================== | ||||
| const String name; | const String name; | ||||
| const String category; | |||||
| UnitTestRunner* runner; | UnitTestRunner* runner; | ||||
| JUCE_DECLARE_NON_COPYABLE (UnitTest) | JUCE_DECLARE_NON_COPYABLE (UnitTest) | ||||
| @@ -335,6 +345,14 @@ public: | |||||
| */ | */ | ||||
| void runAllTests (int64 randomSeed = 0); | 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. | /** Sets a flag to indicate whether an assertion should be triggered if a test fails. | ||||
| This is true by default. | This is true by default. | ||||
| */ | */ | ||||
| @@ -158,7 +158,7 @@ bool GZIPCompressorOutputStream::setPosition (int64 /*newPosition*/) | |||||
| class GZIPTests : public UnitTest | class GZIPTests : public UnitTest | ||||
| { | { | ||||
| public: | public: | ||||
| GZIPTests() : UnitTest ("GZIP") {} | |||||
| GZIPTests() : UnitTest ("GZIP", "Compression") {} | |||||
| void runTest() override | void runTest() override | ||||
| { | { | ||||
| @@ -368,7 +368,7 @@ int BlowFish::unpad (const void* data, size_t size) noexcept | |||||
| class BlowFishTests : public UnitTest | class BlowFishTests : public UnitTest | ||||
| { | { | ||||
| public: | public: | ||||
| BlowFishTests() : UnitTest ("BlowFish") {} | |||||
| BlowFishTests() : UnitTest ("BlowFish", "Cryptography") {} | |||||
| static void fillMemoryBlockWithRandomData (MemoryBlock& block, Random& random) | static void fillMemoryBlockWithRandomData (MemoryBlock& block, Random& random) | ||||
| { | { | ||||
| @@ -307,7 +307,7 @@ bool MD5::operator!= (const MD5& other) const noexcept { return ! operator== ( | |||||
| class MD5Tests : public UnitTest | class MD5Tests : public UnitTest | ||||
| { | { | ||||
| public: | public: | ||||
| MD5Tests() : UnitTest ("MD5") {} | |||||
| MD5Tests() : UnitTest ("MD5", "Cryptography") {} | |||||
| void test (const char* input, const char* expected) | void test (const char* input, const char* expected) | ||||
| { | { | ||||
| @@ -240,7 +240,7 @@ bool SHA256::operator!= (const SHA256& other) const noexcept { return ! operato | |||||
| class SHA256Tests : public UnitTest | class SHA256Tests : public UnitTest | ||||
| { | { | ||||
| public: | public: | ||||
| SHA256Tests() : UnitTest ("SHA-256") {} | |||||
| SHA256Tests() : UnitTest ("SHA-256", "Cryptography") {} | |||||
| void test (const char* input, const char* expected) | void test (const char* input, const char* expected) | ||||
| { | { | ||||
| @@ -626,7 +626,7 @@ bool Whirlpool::operator!= (const Whirlpool& other) const noexcept { return ! o | |||||
| class WhirlpoolTests : public UnitTest | class WhirlpoolTests : public UnitTest | ||||
| { | { | ||||
| public: | public: | ||||
| WhirlpoolTests() : UnitTest ("Whirlpool") {} | |||||
| WhirlpoolTests() : UnitTest ("Whirlpool", "Cryptography") {} | |||||
| void test (const char* input, const char* expected) | void test (const char* input, const char* expected) | ||||
| { | { | ||||
| @@ -29,7 +29,7 @@ | |||||
| class CachedValueTests : public UnitTest | class CachedValueTests : public UnitTest | ||||
| { | { | ||||
| public: | public: | ||||
| CachedValueTests() : UnitTest ("CachedValues") {} | |||||
| CachedValueTests() : UnitTest ("CachedValues", "Values") {} | |||||
| void runTest() override | void runTest() override | ||||
| { | { | ||||
| @@ -1057,7 +1057,7 @@ void ValueTree::Listener::valueTreeRedirected (ValueTree&) {} | |||||
| class ValueTreeTests : public UnitTest | class ValueTreeTests : public UnitTest | ||||
| { | { | ||||
| public: | public: | ||||
| ValueTreeTests() : UnitTest ("ValueTrees") {} | |||||
| ValueTreeTests() : UnitTest ("ValueTrees", "Values") {} | |||||
| static String createRandomIdentifier (Random& r) | static String createRandomIdentifier (Random& r) | ||||
| { | { | ||||
| @@ -397,7 +397,7 @@ String OSCAddressPattern::toString() const noexcept | |||||
| class OSCAddressTests : public UnitTest | class OSCAddressTests : public UnitTest | ||||
| { | { | ||||
| public: | public: | ||||
| OSCAddressTests() : UnitTest ("OSCAddress class") {} | |||||
| OSCAddressTests() : UnitTest ("OSCAddress class", "OSC") {} | |||||
| void runTest() | void runTest() | ||||
| { | { | ||||
| @@ -441,7 +441,7 @@ static OSCAddressTests OSCAddressUnitTests; | |||||
| class OSCAddressPatternTests : public UnitTest | class OSCAddressPatternTests : public UnitTest | ||||
| { | { | ||||
| public: | public: | ||||
| OSCAddressPatternTests() : UnitTest ("OSCAddressPattern class") {} | |||||
| OSCAddressPatternTests() : UnitTest ("OSCAddressPattern class", "OSC") {} | |||||
| void runTest() | void runTest() | ||||
| { | { | ||||
| @@ -580,7 +580,7 @@ static OSCAddressPatternTests OSCAddressPatternUnitTests; | |||||
| class OSCPatternMatcherTests : public UnitTest | class OSCPatternMatcherTests : public UnitTest | ||||
| { | { | ||||
| public: | public: | ||||
| OSCPatternMatcherTests() : UnitTest ("OSCAddress class / pattern matching") {} | |||||
| OSCPatternMatcherTests() : UnitTest ("OSCAddress class / pattern matching", "OSC") {} | |||||
| void runTest() | void runTest() | ||||
| { | { | ||||
| @@ -88,7 +88,7 @@ const MemoryBlock& OSCArgument::getBlob() const noexcept | |||||
| class OSCArgumentTests : public UnitTest | class OSCArgumentTests : public UnitTest | ||||
| { | { | ||||
| public: | public: | ||||
| OSCArgumentTests() : UnitTest ("OSCArgument class") {} | |||||
| OSCArgumentTests() : UnitTest ("OSCArgument class", "OSC") {} | |||||
| MemoryBlock getMemoryBlockWithRandomData (size_t numBytes) | MemoryBlock getMemoryBlockWithRandomData (size_t numBytes) | ||||
| @@ -111,7 +111,7 @@ const OSCBundle& OSCBundle::Element::getBundle() const | |||||
| class OSCBundleTests : public UnitTest | class OSCBundleTests : public UnitTest | ||||
| { | { | ||||
| public: | public: | ||||
| OSCBundleTests() : UnitTest ("OSCBundle class") {} | |||||
| OSCBundleTests() : UnitTest ("OSCBundle class", "OSC") {} | |||||
| void runTest() | void runTest() | ||||
| { | { | ||||
| @@ -214,7 +214,7 @@ static OSCBundleTests OSCBundleUnitTests; | |||||
| class OSCBundleElementTests : public UnitTest | class OSCBundleElementTests : public UnitTest | ||||
| { | { | ||||
| public: | public: | ||||
| OSCBundleElementTests() : UnitTest ("OSCBundle::Element class") {} | |||||
| OSCBundleElementTests() : UnitTest ("OSCBundle::Element class", "OSC") {} | |||||
| void runTest() | void runTest() | ||||
| { | { | ||||
| @@ -85,7 +85,7 @@ void OSCMessage::addArgument (OSCArgument arg) { arguments.add (arg); } | |||||
| class OSCMessageTests : public UnitTest | class OSCMessageTests : public UnitTest | ||||
| { | { | ||||
| public: | public: | ||||
| OSCMessageTests() : UnitTest ("OSCMessage class") {} | |||||
| OSCMessageTests() : UnitTest ("OSCMessage class", "OSC") {} | |||||
| void runTest() | void runTest() | ||||
| { | { | ||||
| @@ -635,7 +635,7 @@ void OSCReceiver::registerFormatErrorHandler (FormatErrorHandler handler) | |||||
| class OSCInputStreamTests : public UnitTest | class OSCInputStreamTests : public UnitTest | ||||
| { | { | ||||
| public: | public: | ||||
| OSCInputStreamTests() : UnitTest ("OSCInputStream class") {} | |||||
| OSCInputStreamTests() : UnitTest ("OSCInputStream class", "OSC") {} | |||||
| void runTest() | void runTest() | ||||
| { | { | ||||
| @@ -314,7 +314,7 @@ bool OSCSender::sendToIPAddress (const String& host, int port, const OSCBundle& | |||||
| class OSCBinaryWriterTests : public UnitTest | class OSCBinaryWriterTests : public UnitTest | ||||
| { | { | ||||
| public: | public: | ||||
| OSCBinaryWriterTests() : UnitTest ("OSCBinaryWriter class") {} | |||||
| OSCBinaryWriterTests() : UnitTest ("OSCBinaryWriter class", "OSC") {} | |||||
| void runTest() | void runTest() | ||||
| { | { | ||||
| @@ -641,7 +641,7 @@ static OSCBinaryWriterTests OSCBinaryWriterUnitTests; | |||||
| class OSCRoundTripTests : public UnitTest | class OSCRoundTripTests : public UnitTest | ||||
| { | { | ||||
| public: | public: | ||||
| OSCRoundTripTests() : UnitTest ("OSCRoundTripTests class") {} | |||||
| OSCRoundTripTests() : UnitTest ("OSCRoundTripTests class", "OSC") {} | |||||
| void runTest() | void runTest() | ||||
| { | { | ||||
| @@ -80,7 +80,7 @@ bool OSCTimeTag::isImmediately() const noexcept | |||||
| class OSCTimeTagTests : public UnitTest | class OSCTimeTagTests : public UnitTest | ||||
| { | { | ||||
| public: | public: | ||||
| OSCTimeTagTests() : UnitTest ("OSCTimeTag class") {} | |||||
| OSCTimeTagTests() : UnitTest ("OSCTimeTag class", "OSC") {} | |||||
| void runTest() | void runTest() | ||||
| { | { | ||||