Add file structure for automatic unit-testing
This commit is contained in:
5
Makefile
5
Makefile
@@ -79,6 +79,11 @@ distclean: clean
|
|||||||
$(E) "[REM] $(BINDIR)"
|
$(E) "[REM] $(BINDIR)"
|
||||||
$(Q) $(RMR) $(BINDIR)
|
$(Q) $(RMR) $(BINDIR)
|
||||||
|
|
||||||
|
.PHONY: check
|
||||||
|
check:
|
||||||
|
$(E) "[CHK] Not implemented."
|
||||||
|
$(Q) true
|
||||||
|
|
||||||
.PHONY: listen
|
.PHONY: listen
|
||||||
listen: opt/tools/serial-listen
|
listen: opt/tools/serial-listen
|
||||||
$(E) "[RUN] $<"
|
$(E) "[RUN] $<"
|
||||||
|
|||||||
@@ -36,6 +36,13 @@ of these commands:
|
|||||||
make clean
|
make clean
|
||||||
make distclean
|
make distclean
|
||||||
|
|
||||||
|
Isolated unit tests allow you to verify all testable
|
||||||
|
components are behaving as expected. Please note that most
|
||||||
|
tests will be added later down the road, when the project
|
||||||
|
has reached a more mature state.
|
||||||
|
|
||||||
|
make check
|
||||||
|
|
||||||
You can listen on the serial debug interface by running
|
You can listen on the serial debug interface by running
|
||||||
the command below. This will also initialize all optional
|
the command below. This will also initialize all optional
|
||||||
submodules on first invocation.
|
submodules on first invocation.
|
||||||
@@ -64,8 +71,8 @@ Issue the SET command to update the target settings:
|
|||||||
|
|
||||||
Settings are stored in EEPROM and are persistent until a new
|
Settings are stored in EEPROM and are persistent until a new
|
||||||
SET command is issued. Keywords are not case-sensitive. Both
|
SET command is issued. Keywords are not case-sensitive. Both
|
||||||
arguments may contain a decimal point followed by a sequence
|
arguments may contain an optional decimal point followed by
|
||||||
of digits.
|
a sequence of digits.
|
||||||
|
|
||||||
### Webinterface Example
|
### Webinterface Example
|
||||||
|
|
||||||
|
|||||||
1
tests/bus/test-i2c.c
Normal file
1
tests/bus/test-i2c.c
Normal file
@@ -0,0 +1 @@
|
|||||||
|
static void *TODO;
|
||||||
1
tests/bus/test-mosfet.c
Normal file
1
tests/bus/test-mosfet.c
Normal file
@@ -0,0 +1 @@
|
|||||||
|
static void *TODO;
|
||||||
1
tests/bus/test-pwm.c
Normal file
1
tests/bus/test-pwm.c
Normal file
@@ -0,0 +1 @@
|
|||||||
|
static void *TODO;
|
||||||
1
tests/bus/test-usart.c
Normal file
1
tests/bus/test-usart.c
Normal file
@@ -0,0 +1 @@
|
|||||||
|
static void *TODO;
|
||||||
1
tests/common/test-math.c
Normal file
1
tests/common/test-math.c
Normal file
@@ -0,0 +1 @@
|
|||||||
|
static void *TODO;
|
||||||
1
tests/common/test-memory.c
Normal file
1
tests/common/test-memory.c
Normal file
@@ -0,0 +1 @@
|
|||||||
|
static void *TODO;
|
||||||
1
tests/common/test-parser.c
Normal file
1
tests/common/test-parser.c
Normal file
@@ -0,0 +1 @@
|
|||||||
|
static void *TODO;
|
||||||
10
tests/main.c
Normal file
10
tests/main.c
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
// TODO: Automatic unit-testing.
|
||||||
|
|
||||||
|
int main(void)
|
||||||
|
{
|
||||||
|
// 1. Write unit-tests.
|
||||||
|
// 2. Run them.
|
||||||
|
// 3. Profit!
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user