adafruit/Adafruit_CC3000_Library — pull request #27 by tdicola (2013-10-22 23:40:08+00:00)
Title: Remove tx buffer from client, add tests, and fix bugs with fastrprint handling null strings.

This commit does the following:

- Removes the transmit buffer from being a member of each client instance. The transmit buffer is only used
to buffer strings from flash memory to send out on sockets, therefore it's not necessary to have a separate
buffer with each client. The transmist buffer is now a local variable of the fastrprint function.

- Adds a test directory with a small suite of tests for the fastrprint function. A README.md explains the
usage of the tests, and a small python script is provided for capturing output of tests.

- Fixes a few bugs with fastrprint and fastrprintln calling send (and sending garbage data on the socket) when
they receive a null string. Simple string length checks now catch these conditions and respond appropriately.

- Puts an end of line constant used by fastrprintln into flash memory instead of RAM.

This commit was tested by running the included Client_fastrprint test suite before and after the changes,
capturing the output of these tests, and comparing the before/after output with diff to ensure there was no
change in functionality. Execution time of the tests before and after was mostly unchanged, 134 vs. 135
milliseconds. Memory usage with multiple clients decreased as expected by moving the tx buffer out of each
class instance.