   ASSERT(pb.read(tag, type) == 1);
   ASSERT(tag == 2 && type == ProtocolBuffer::LENGTH_DELIMITED);
   memset(buf, 0, sizeof(buf));
-  ASSERT(pb.read(buf, sizeof(buf)) == (int) strlen(b));
-  ASSERT(memcmp(buf, b, strlen(b)) == 0);
+  ASSERT(pb.read(buf, sizeof(buf)) == (int) strlen_P(b_P));
+  ASSERT(memcmp_P(buf, b_P, strlen_P(b_P)) == 0);
+  iob.empty();
   //
   // EMBEDDED MESSAGES
   //


// Selectable test suites
#define TEST_RANGE
#define TEST_LIMITS
#define TEST_STRUCT
#define TEST_EXAMPLES

void setup()
{
  IOBuffer<32> iob;
  ProtocolBuffer pb(&iob, &iob);
  static char s[] = "Google Protocol Buffers";
  ProtocolBuffer::Type type;
  char buf[32];
  uint8_t tag;
  float32_t f;
  uint32_t u;
  int32_t v;
  int count;

  uart.begin(9600);
  trace.begin(&uart, PSTR("CosaProtocolBuffer: started"));

  ASSERT(v == (int32_t) 0x80000000);

  // Test a length delimited string
  static char s[] = "Google Protocol Buffers";
  ASSERT(pb.write(1, s, strlen(s) + 1) == (int) strlen(s) + 3);
  ASSERT(pb.read(tag, type) == 1);
  ASSERT(tag == 1 && type == ProtocolBuffer::LENGTH_DELIMITED);
