mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
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.
This commit is contained in:
parent
1044015465
commit
6bfcd820b4
42 changed files with 129 additions and 62 deletions
|
|
@ -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);
|
||||
|
||||
logMessage ("This panel runs all the built-in JUCE unit-tests.\n");
|
||||
auto categories = UnitTest::getAllCategories();
|
||||
categories.sort (true);
|
||||
|
||||
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);
|
||||
|
||||
startTestButton.setBounds (r.removeFromTop (25).removeFromLeft (200));
|
||||
testResultsBox.setBounds (r.withTrimmedTop (5));
|
||||
auto topSlice = bounds.removeFromTop (25);
|
||||
startTestButton.setBounds (topSlice.removeFromLeft (200));
|
||||
topSlice.removeFromLeft (10);
|
||||
categoriesBox.setBounds (topSlice.removeFromLeft (250));
|
||||
|
||||
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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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
|
||||
//
|
||||
|
|
|
|||
|
|
@ -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
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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
|
||||
{
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
struct HashMapTest : public UnitTest
|
||||
{
|
||||
HashMapTest() : UnitTest ("HashMap") {}
|
||||
HashMapTest() : UnitTest ("HashMap", "Containers") {}
|
||||
|
||||
void runTest() override
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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
|
||||
{
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ namespace FunctionTestsHelpers
|
|||
class FunctionTests : public UnitTest
|
||||
{
|
||||
public:
|
||||
FunctionTests() : UnitTest ("Function") {}
|
||||
FunctionTests() : UnitTest ("Function", "Function") {}
|
||||
|
||||
void runTest() override
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ String ChildProcess::readAllProcessOutput()
|
|||
class ChildProcessTests : public UnitTest
|
||||
{
|
||||
public:
|
||||
ChildProcessTests() : UnitTest ("ChildProcess") {}
|
||||
ChildProcessTests() : UnitTest ("ChildProcess", "Threads") {}
|
||||
|
||||
void runTest() override
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
{}
|
||||
|
||||
|
|
|
|||
|
|
@ -628,7 +628,7 @@ Time Time::getCompilationDate()
|
|||
class TimeTests : public UnitTest
|
||||
{
|
||||
public:
|
||||
TimeTests() : UnitTest ("Time") {}
|
||||
TimeTests() : UnitTest ("Time", "Time") {}
|
||||
|
||||
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);
|
||||
}
|
||||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -158,7 +158,7 @@ bool GZIPCompressorOutputStream::setPosition (int64 /*newPosition*/)
|
|||
class GZIPTests : public UnitTest
|
||||
{
|
||||
public:
|
||||
GZIPTests() : UnitTest ("GZIP") {}
|
||||
GZIPTests() : UnitTest ("GZIP", "Compression") {}
|
||||
|
||||
void runTest() override
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
class CachedValueTests : public UnitTest
|
||||
{
|
||||
public:
|
||||
CachedValueTests() : UnitTest ("CachedValues") {}
|
||||
CachedValueTests() : UnitTest ("CachedValues", "Values") {}
|
||||
|
||||
void runTest() override
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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…
Add table
Add a link
Reference in a new issue