     setupMidiInstance<SoftwareSerial>(midiSW);
     setupLCD();
     setupLEDs();
+    setupTesters();
 }
 
 // -----------------------------------------------------------------------------
 
 void loop()
 {
-    
-}
+    testerHW.runTests();
+    testerSW.runTests();
+}


void setupLCD()
{
    lcd.begin(16,2);
}


{
    pinMode(LED_PASS, OUTPUT);
    pinMode(LED_FAIL, OUTPUT);
}

template<class SerialClass>
void setupTester(MidiTester<SerialClass>& inTester)
{
    inTester.registerTest(new midi::TestFixture("Note On", midi::testNoteOn));
}

// -----------------------------------------------------------------------------

void setProgressBar(unsigned inProgress, unsigned inTotal)
{
    const byte numCols = 16;
    const byte numPix = 5;
    const unsigned progress = (inProgress * numCols* numPix) / inTotal;
    const byte cursorX = progress / numPix;
    const byte charIndex = progress % numPix;
    
    lcd.setCursor(cursorX, 1);
    lcd.write(charIndex);
}

// -----------------------------------------------------------------------------

inline void blinkLed(byte inLedNum)
{
    digitalWrite(inLedNum, HIGH);
    delay(100);
    digitalWrite(inLedNum, LOW);
}

inline void blinkPass()
{
    blinkLed(LED_PASS);
}

inline void blinkFail()
{
    blinkLed(LED_FAIL);
}

inline void setLedsFinal(bool inSuccess)
{
    if (inSuccess)
    {
        digitalWrite(LED_PASS, HIGH);
        digitalWrite(LED_FAIL, LOW);
    }   
    else
    {
        digitalWrite(LED_FAIL, HIGH);
        digitalWrite(LED_PASS, LOW);
    }
}

// -----------------------------------------------------------------------------
