Find out how to ‘Throw The Switch’ with Unity CMock and Ceedling here!
- In a nutshell…
- Unity (stable) is a Unit-Test framework for the C language
- CMock (stable) is a Mock Module Generation Framework for C
- Ceedling (alpha) is a command-line build environment aimed primarily at C-based projects
- Emacs unity-mode is an emacs minor mode whose aim is to integrate efficiently with all three projects, and add some literate configuration via org-mode.
- Unity CMock Ceedling written and maintained (C) Greg Williams, Mike Karlesky, Mark VanderVoord
- This code is designed and tested with the help of ERT (unit-testing
library). The tests are run from within the unity_test_project with…
M-x ert-run-tests
- display, paths, directories, rakefile.
Enables rapid automated and intelligent configuration of project structure in terms of directory layout, config file generation, directory generation - all overrideable. This is done once at project birth and is initiated by typing…
M-x unity-setup
Settings can also be adjusted manually at any time using the Emacs Customization front-end, or by modifying your project configuration file (this is where all Unity Mode settings are kept, and are therefore under revision-control for easy resumption of projects). Of course unity-setup can be re-run at any time to modify the setup.
Ideally this should be dedicated to a single key for speed. I have it mapped to F5 with the following in my init file…
(global-set-key [f5] ‘unity-toggle-test-src-header-buffer)
This is also available out of the box with…
C-; C-t
This enables rapid navigation between pattern modules within the project (test and source etc). The cycling is intelligent enough to ignore missing and unneeded modules etc.
Configuration is part of the automated unity-setup but can be altered at any point in time.
Ideally this should be dedicated to a single chord/key for speed. I have it mapped to C-F5 with the following in my init file…
(global-set-key [C-f5] ‘unity-toggle-MCH-buffer)
This is also available out of the box with…
C-; C-m
This enables rapid navigation between source files of the same type (ie source, header, test etc) that are in the same directory of the currently visited file. The files are cycled in ascending alphabetical order and search wraps around automatically.
Configuration is part of the automated unity-setup but can be altered at any point in time.
Ideally this should be dedicated to a single chord/key for speed. I have it mapped to C-F5 with the following in my init file…
(global-set-key [f6] ‘unity-cycle-alpha-ascending)
This is also available out of the box with…
C-; C-n (as in next)
As ascending but in descending alphabetical order.
Ideally this should be dedicated to the ascending cycling key only shifted.
I have it mapped to Shift F6 with the following in my init file…
(global-set-key [S-f6] ‘unity-cycle-alpha-descending)
This is also available out of the box with…
C-; C-p (as in previous)
Within a test file the cursor simply needs to be somewhere over the test in question for this command to enable / disable the test.
The keystroke for this is…
C-; C-i (ignore)
- TODO Refactor for agnostic test-library use, agnostic project design language, multiple prefix /suffix definition
- TODO Finish Auto Unity-Mode configuration file generation
- project.org, project.yml
- TODO Finish assertion snippets and internalise for non-yasnippets people
- TODO Finish conception and design of project.org
- TODO Finish project.yml generation
- TODO Finish test activation sequences
- TODO Finish linked failure display
- TODO Start help screen for commands and snippets
- TODO Start test summary display
- TODO Start continuous-testing hook
- TODO Start source dired selection
- TODO Start Triad/Diad auto-generation (and selection screen)
- TODO Org-Mode and/or Info Documentation
- TODO Check and fix windoze breakages
- TODO Do a Screencast for the benefit of non-emacsers :)
- TODO Consider light background key-mapping
- TODO Consider ELPA compliance