Skip to content

mjago/unity-mode

Repository files navigation

Unity Minor Mode for Emacs (sub-alpha)

Minor mode for integration with Unity and friends

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

Unity-Mode Features

  • 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

Auto Unity-Mode configuration

  • 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.

test - src - header fast single key/chord navigation cycling.

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

Model-Conductor-Hardware, Presenter-First (or other) design-pattern fast-key navigation cycling.

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

Alpha-File-Type fast-key navigation cycling (ascending).

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)

Alpha-File-Type fast-key navigation cycling (descending).

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)

Fast enabling / disabling of tests

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)

Key-map colour configuration.

Features to complete

  • 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

About

Emacs minor mode for integration with Unity and friends

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published