   assertEquals(1, _digitalPort);
 }
 
+test(setFirmwareVersionDoesNotLeakMemory)
+{
+  Firmata.setFirmwareVersion(1, 0);
+  int initialMemory = freeMemory();
+
+  Firmata.setFirmwareVersion(1, 0);
+
+  assertEquals(0, initialMemory - freeMemory());
+}


test(beginPrintsVersion)
{
  InMemoryStream stream;

  Firmata.begin(stream);

  char expected[] = 
  {
    0xF9, // Version reporting identifier 
    2,    // Major version number
    3,    // Minor version number
    0
  };
  assertStringsEqual(__test__, expected, stream.bytesWritten());

  suite.run();
}

void assertStringsEqual(Test& __test__, const char* expected, const String& actual)
{
  size_t expectedLength = strlen(expected);
