Skip to content

Commit

Permalink
Notice the order of the expectations are not enforced. Here the order…
Browse files Browse the repository at this point in the history
… is critical. Fix that next
  • Loading branch information
jwgrenning committed Aug 1, 2013
1 parent 1028304 commit 7b86ff5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
14 changes: 13 additions & 1 deletion production-src/MicrocontrollerCode.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
/*
* NOTE: I would not leave the commented out old code in here once I am done.
* It's here jsut to show the minor edits needed to get the legacy
* code under test.
*
* The say_hi() function is not interesting, it was just an easy place to
* start to get the tooling in place.
*/



#include "REG1210.h"
#define RAM_START 0xc000000
#define LOG_DATA_START_ADDRESS (RAM_START + 0x1000)
Expand Down Expand Up @@ -45,5 +56,6 @@ void say_hi()
TI_0 = 0;

// IE = 0b11010000;
IE = b11010000;
WRITE_REG(IE, b11010000);
// IE = b11010000;
}
1 change: 1 addition & 0 deletions test/TestMicroControllerCode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ TEST_GROUP(MicroControllerCode)
TEST(MicroControllerCode, say_hi)
{
expect_write_reg("IE", b11000000);
expect_write_reg("IE", b11010000);
expect_read_reg("TI_0", 42);
expect_read_reg("TI_0", 42);
expect_read_reg("TI_0", 42);
Expand Down

0 comments on commit 7b86ff5

Please sign in to comment.