laurens 0af0e20d15 Refactor transform_inline_functions
- Just looking for static|inline in the gsub is a bit too aggressive.
  Instead, look for the "static inline" and parse it:
  - Everything before the match should just be copied, we don't want
    to touch anything but the inline functions.
  - Remove the implementation of the inline function (this is enclosed
    in square brackets) and replace it with ";" to complete the
    transformation to normal/non-inline function.
  - Copy everything after the inline function implementation

Repeat the above step until we can't find "static inline" anymore

- To remove the inline implementation,
  we count the number of square-bracket 'levels' in the inline function
  and remove every pair. This ensures that constructs like:
  inline void func(void) {
      if (...) {
        //NOP
      }
      else
      {
        //NOP
      }
  }
  will not end up leaving the 'else' keyword unremoved:
  inline void func(void);
      else
  If we count the number of levels, we don't end up in this scenario
  since we remove 3 'pairs', the if-one, the else-one and finally the
  main body.
2019-11-12 20:01:04 +01:00
2019-11-10 18:39:35 +01:00
2019-11-12 20:01:04 +01:00
2019-11-12 20:01:04 +01:00
2019-10-30 10:34:37 -04:00
2018-11-13 21:11:15 -05:00
2019-10-12 09:22:31 -07:00

CMock - Mock/stub generator for C

CMock Build Status

Getting Started

If you're using Ceedling, there is no need to install CMock. It will handle it for you. For everyone else, the simplest way is to grab it off github. You can also download it as a zip if you prefer. The Github method looks something like this:

> git clone --recursive https://github.com/throwtheswitch/cmock.git
> cd cmock
> bundle install # Ensures you have all RubyGems needed

If you plan to help with the development of CMock (or just want to verify that it can perform its self tests on your system) then you can enter the test directory and then ask it to test:

> cd test
> rake # Run all CMock self tests

API Documentation

S
Description
Mirror of https://github.com/ThrowTheSwitch/CMock.git for ESP-IDF submodules
Readme 4.9 MiB
Languages
C 58.9%
Ruby 23.2%
Assembly 9.5%
Tcl 7.9%
Batchfile 0.4%