Uh, thanks Nick. That's the most confusing .h file I've ever tried to figure out.
On my machine the failed case produces some kind of garbage on the serial port and then locks up (as it should).
Are you supposed to be able to include a message in the assert?
Here's what I'm doing...
#include <assert.h>
void setup ()
{
Serial.begin (9600);
Serial.println("testing");
assert (1 == 1);
Serial.println ("assertion passed.");
assert (1 == 2);
// Serial.println (" false assertion passed.");
}
void loop () {}
The fail case drives the serial monitor crazy and chops off everything after the first two letters on the screen, "te." If I comment out the second assert everything works as expected.