Skip to content

Commit

Permalink
Added serial support for the Arduino Leonardo/Micro. Updates the read…
Browse files Browse the repository at this point in the history
…me accordingly.
  • Loading branch information
hanna-h committed Oct 27, 2014
1 parent ec3e126 commit ea433b8
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 1 deletion.
6 changes: 6 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ test(bad)
void setup()
{
Serial.begin(9600);
while(!Serial); // for the Arduino Leonardo/Micro only
}
void loop()
Expand Down Expand Up @@ -330,6 +331,7 @@ A single test `my_test`
void setup()
{
Serial.begin(9600);
while(!Serial); // for the Arduino Leonardo/Micro only
Test::exclude("*");
Test::include("my_test");
}
Expand All @@ -340,6 +342,7 @@ All tests named dev_-something, but not the ones ending in _skip or _slow, or ha
void setup()
{
Serial.begin(9600);
while(!Serial); // for the Arduino Leonardo/Micro only
Test::exclude("*");
Test::include("dev_*");
Test::exclude("*_slow");
Expand Down Expand Up @@ -380,6 +383,9 @@ A. Here is a troubleshooting guideline:
* Make sure you call `Serial.begin()` in your setup. Or, if you redirect
output by changing the value of `Test::out`, make sure you configure
the Print stream you direct it to.
* If you are using an Arduino Leonardo/Micro: don't forget to add
`while(!Serial)` after `Serial.begin(9600)` in the setup(). Without this line
nothing will be printed in the serial monitor.
* Make sure you call `Test::run()` in your loop().
* Make sure you did not exclude the test(s) with `Test::exclude(pattern)`.
By default all tests are included.
Expand Down
1 change: 1 addition & 0 deletions src/examples/advanced/advanced.ino
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ MyTest myTest3("myTest3");
void setup()
{
Serial.begin(9600);
while(!Serial); // for the Arduino Leonardo/Micro only

Test::min_verbosity |= TEST_VERBOSITY_ASSERTIONS_ALL;
Test::exclude("my*2");
Expand Down
1 change: 1 addition & 0 deletions src/examples/basic/basic.ino
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ test(incorrect)
void setup()
{
Serial.begin(9600);
while(!Serial); // for the Arduino Leonardo/Micro only
}

void loop()
Expand Down
1 change: 1 addition & 0 deletions src/examples/continuous/continuous.ino
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ testing(continuous)
void setup()
{
Serial.begin(9600);
while(!Serial); // for the Arduino Leonardo/Micro only
}

void loop()
Expand Down
1 change: 1 addition & 0 deletions src/examples/digital_pin_test/digital_pin_test.ino
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ THE SOFTWARE.

void setup() {
Serial.begin(9600);
while(!Serial); // for the Arduino Leonardo/Micro only
}

/**
Expand Down
3 changes: 2 additions & 1 deletion src/examples/filter/filter.ino
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ test(crypto_sha256) { pass(); }
void setup()
{
Serial.begin(9600);

while(!Serial); // for the Arduino Leonardo/Micro only

// all tests named net_ - something, except net_ftp
Test::exclude("*");
Test::include("net_*");
Expand Down
1 change: 1 addition & 0 deletions src/examples/verbosity/verbosity.ino
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ test(quiet_skip)
void setup()
{
Serial.begin(9600);
while(!Serial); // for the Arduino Leonardo/Micro only
}

void loop()
Expand Down

0 comments on commit ea433b8

Please sign in to comment.