diff options
author | Fred Sundvik <fsundvik@gmail.com> | 2016-02-14 13:05:50 +0200 |
---|---|---|
committer | Fred Sundvik <fsundvik@gmail.com> | 2016-02-14 13:05:50 +0200 |
commit | 8a991a266e7f8f9aff48049dffb17eccfa353ca1 (patch) | |
tree | 3c7798fb69948efbbd78f59628810644dcbdef4a /serial_link | |
parent | 1f1bc183dd1080e14a2d85010d5c7f6455f023f6 (diff) |
Rename files to match what they actually do
Also add validator before routing.
Diffstat (limited to 'serial_link')
-rw-r--r-- | serial_link/protocol/byte_stuffer.c (renamed from serial_link/protocol/data_link.c) | 4 | ||||
-rw-r--r-- | serial_link/protocol/byte_stuffer.h (renamed from serial_link/protocol/data_link.h) | 0 | ||||
-rw-r--r-- | serial_link/protocol/frame_validator.h (renamed from serial_link/protocol/routing.h) | 0 | ||||
-rw-r--r-- | serial_link/tests/byte_stuffer_tests.c (renamed from serial_link/tests/data_link_tests.c) | 18 |
4 files changed, 11 insertions, 11 deletions
diff --git a/serial_link/protocol/data_link.c b/serial_link/protocol/byte_stuffer.c index 71d538470c..95ce86524f 100644 --- a/serial_link/protocol/data_link.c +++ b/serial_link/protocol/byte_stuffer.c @@ -22,8 +22,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include "protocol/data_link.h" -#include "protocol/routing.h" +#include "protocol/byte_stuffer.h" +#include "protocol/frame_validator.h" void recv_byte(uint8_t data) { } diff --git a/serial_link/protocol/data_link.h b/serial_link/protocol/byte_stuffer.h index 3b9f9ea5d4..3b9f9ea5d4 100644 --- a/serial_link/protocol/data_link.h +++ b/serial_link/protocol/byte_stuffer.h diff --git a/serial_link/protocol/routing.h b/serial_link/protocol/frame_validator.h index ee1f9a78ae..ee1f9a78ae 100644 --- a/serial_link/protocol/routing.h +++ b/serial_link/protocol/frame_validator.h diff --git a/serial_link/tests/data_link_tests.c b/serial_link/tests/byte_stuffer_tests.c index 1b7107e708..418d48f6a4 100644 --- a/serial_link/tests/data_link_tests.c +++ b/serial_link/tests/byte_stuffer_tests.c @@ -24,29 +24,29 @@ SOFTWARE. #include <cgreen/cgreen.h> #include <cgreen/mocks.h> -#include "protocol/data_link.h" -#include "protocol/data_link.c" -#include "protocol/routing.h" +#include "protocol/byte_stuffer.h" +#include "protocol/byte_stuffer.c" +#include "protocol/frame_validator.h" -Describe(DataLink); -BeforeEach(DataLink) {} -AfterEach(DataLink) {} +Describe(ByteStuffer); +BeforeEach(ByteStuffer) {} +AfterEach(ByteStuffer) {} void recv_frame(uint8_t* data, uint16_t size) { mock(data, size); } -Ensure(DataLink, receives_no_frame_for_a_single_zero_byte) { +Ensure(ByteStuffer, receives_no_frame_for_a_single_zero_byte) { never_expect(recv_frame); recv_byte(0); } -Ensure(DataLink, receives_no_frame_for_a_single_FF_byte) { +Ensure(ByteStuffer, receives_no_frame_for_a_single_FF_byte) { never_expect(recv_frame); recv_byte(0xFF); } -Ensure(DataLink, receives_no_frame_for_a_single_random_byte) { +Ensure(ByteStuffer, receives_no_frame_for_a_single_random_byte) { never_expect(recv_frame); recv_byte(0x4A); } |