Skip to content

Arduino demo project for sput-ino lib (Sput unit testing framework for C/C++)

License

Notifications You must be signed in to change notification settings

sadr0b0t/sput-ino-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sput-ino-demo

Arduino demo project for sput-ino lib (Sput unit testing framework for C/C++)

https://github.com/sadr0b0t/sput-ino

Project structure

Tested project should be set up as Arduino library.

Project business logic to test

src/mylib.h
src/mylib.cpp

Startup sketch

sput-ino-demo/sput-ino-demo.ino

Projects tests

test/

Tests and test suites

test/mylib-test-arduino/mylib-test.h
test/mylib-test-arduino/mylib-test.cpp

Test startup sketch to run tests on device

test/mylib-test-arduino/mylib-test-arduino.ino

Run tests on desktop (libc)

test/mylib-test-desktop/

Main

test/mylib-test-desktop/mylib-test-main.cpp

Arduino API stubs (feel free to edit and add more calls once required)

test/mylib-test-desktop/Arduino.h
test/mylib-test-desktop/Arduino.cpp

minimalistic build script (should be better converted to favourite build tool config)

test/mylib-test-desktop/build.sh

Workflow setup

Tested project should be set up as Arduino library. Copy or link project dir to $HOME/Arduino/libraries

Either store *.h and *.cpp files in project root or put them to src dir and add library.properties file to project root in this case.

Project sketch would be available from File > Examples menu, but it will open read-only. To open project and project test sketches for editing, open them as regular Arduino sketch from file system with File > Open....

To run project on device open sput-ino-demo/sput-ino-demo.ino as normal Arduino sketch.

To run project tests on device open test/mylib-test-arduino/mylib-test-arduino.ino

To run project tests on desktop, build tests with test/mylib-test-desktop/build.sh script and run test_mylib generated executable.

About

Arduino demo project for sput-ino lib (Sput unit testing framework for C/C++)

Resources

License

Stars

Watchers

Forks

Packages

No packages published