ceedling 0.11.2 → 0.12.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (29) hide show
  1. data/README.md +4 -3
  2. data/bin/ceedling +2 -1
  3. data/examples/blinky/project.yml +98 -0
  4. data/examples/blinky/rakefile.rb +23 -0
  5. data/examples/blinky/src/BlinkTask.c +21 -0
  6. data/examples/blinky/src/BlinkTask.h +8 -0
  7. data/examples/blinky/src/Configure.c +38 -0
  8. data/examples/blinky/src/Configure.h +6 -0
  9. data/examples/blinky/src/main.c +51 -0
  10. data/examples/blinky/src/main.h +9 -0
  11. data/examples/blinky/test/support/stub_interrupt.h +348 -0
  12. data/examples/blinky/test/support/stub_io.h +421 -0
  13. data/examples/blinky/test/support/stub_iom328p.h +883 -0
  14. data/examples/blinky/test/support/stub_sfr_defs.h +269 -0
  15. data/examples/blinky/test/test_BlinkTask.c +36 -0
  16. data/examples/blinky/test/test_Configure.c +28 -0
  17. data/examples/blinky/test/test_main.c +60 -0
  18. data/lib/ceedling/version.rb +4 -4
  19. data/lib/ceedling/version.rb.erb +1 -1
  20. data/new_project_template/vendor/ceedling/docs/CExceptionSummary.pdf +0 -0
  21. data/new_project_template/vendor/ceedling/vendor/c_exception/lib/CException.c +7 -3
  22. data/new_project_template/vendor/ceedling/vendor/c_exception/lib/CException.h +16 -0
  23. data/new_project_template/vendor/ceedling/vendor/c_exception/release/build.info +1 -1
  24. data/new_project_template/vendor/ceedling/vendor/cmock/lib/cmock_generator_plugin_callback.rb +1 -1
  25. data/new_project_template/vendor/ceedling/vendor/cmock/release/build.info +1 -1
  26. data/new_project_template/vendor/ceedling/vendor/unity/release/build.info +1 -1
  27. data/new_project_template/vendor/ceedling/vendor/unity/src/unity.c +18 -3
  28. data/new_project_template/vendor/ceedling/vendor/unity/src/unity_internals.h +3 -3
  29. metadata +19 -4
@@ -3,6 +3,12 @@
3
3
 
4
4
  #include <setjmp.h>
5
5
 
6
+ #ifdef __cplusplus
7
+ extern "C"
8
+ {
9
+ #endif
10
+
11
+
6
12
  //To Use CException, you have a number of options:
7
13
  //1. Just include it and run with the defaults
8
14
  //2. Define any of the following symbols at the command line to override them
@@ -33,6 +39,11 @@
33
39
  #define CEXCEPTION_T unsigned int
34
40
  #endif
35
41
 
42
+ //This is an optional special handler for when there is no global Catch
43
+ #ifndef CEXCEPTION_NO_CATCH_HANDLER
44
+ #define CEXCEPTION_NO_CATCH_HANDLER(id)
45
+ #endif
46
+
36
47
  //exception frame structures
37
48
  typedef struct {
38
49
  jmp_buf* pFrame;
@@ -67,4 +78,9 @@ extern volatile CEXCEPTION_FRAME_T CExceptionFrames[];
67
78
  //Throw an Error
68
79
  void Throw(CEXCEPTION_T ExceptionID);
69
80
 
81
+ #ifdef __cplusplus
82
+ } // extern "C"
83
+ #endif
84
+
85
+
70
86
  #endif // _CEXCEPTION_H
@@ -48,7 +48,7 @@ class CMockGeneratorPluginCallback
48
48
  when 1 then " Mock.#{func_name}_CallbackFunctionPointer(Mock.#{func_name}_CallbackCalls++);\n return;\n }\n"
49
49
  when 2 then " Mock.#{func_name}_CallbackFunctionPointer(#{function[:args].map{|m| m[:name]}.join(', ')});\n return;\n }\n"
50
50
  when 3 then " Mock.#{func_name}_CallbackFunctionPointer(#{function[:args].map{|m| m[:name]}.join(', ')}, Mock.#{func_name}_CallbackCalls++);\n return;\n }\n"
51
- when 4 then " return Mock.#{func_name}_CallbackFunctionPointer(void);\n }\n"
51
+ when 4 then " return Mock.#{func_name}_CallbackFunctionPointer();\n }\n"
52
52
  when 5 then " return Mock.#{func_name}_CallbackFunctionPointer(Mock.#{func_name}_CallbackCalls++);\n }\n"
53
53
  when 6 then " return Mock.#{func_name}_CallbackFunctionPointer(#{function[:args].map{|m| m[:name]}.join(', ')});\n }\n"
54
54
  when 7 then " return Mock.#{func_name}_CallbackFunctionPointer(#{function[:args].map{|m| m[:name]}.join(', ')}, Mock.#{func_name}_CallbackCalls++);\n }\n"
@@ -44,6 +44,9 @@ const _U_UINT UnitySizeMask[] =
44
44
  #endif
45
45
  };
46
46
 
47
+ void UnityPrintFail(void);
48
+ void UnityPrintOk(void);
49
+
47
50
  //-----------------------------------------------
48
51
  // Pretty Printers & Test Result Output Handlers
49
52
  //-----------------------------------------------
@@ -219,6 +222,18 @@ void UnityPrintFloat(_UF number)
219
222
  }
220
223
  #endif
221
224
 
225
+ //-----------------------------------------------
226
+
227
+ void UnityPrintFail(void)
228
+ {
229
+ UnityPrint("FAIL");
230
+ }
231
+
232
+ void UnityPrintOk(void)
233
+ {
234
+ UnityPrint("OK");
235
+ }
236
+
222
237
  //-----------------------------------------------
223
238
  void UnityTestResultsBegin(const char* file, const UNITY_LINE_TYPE line)
224
239
  {
@@ -880,7 +895,7 @@ void UnityFail(const char* msg, const UNITY_LINE_TYPE line)
880
895
  UNITY_SKIP_EXECUTION;
881
896
 
882
897
  UnityTestResultsBegin(Unity.TestFile, line);
883
- UnityPrint("FAIL");
898
+ UnityPrintFail();
884
899
  if (msg != NULL)
885
900
  {
886
901
  UNITY_OUTPUT_CHAR(':');
@@ -953,11 +968,11 @@ int UnityEnd(void)
953
968
  UNITY_PRINT_EOL;
954
969
  if (Unity.TestFailures == 0U)
955
970
  {
956
- UnityPrint("OK");
971
+ UnityPrintOk();
957
972
  }
958
973
  else
959
974
  {
960
- UnityPrint("FAIL");
975
+ UnityPrintFail();
961
976
  }
962
977
  UNITY_PRINT_EOL;
963
978
  return Unity.TestFailures;
@@ -163,11 +163,11 @@ extern int UNITY_OUTPUT_CHAR(int);
163
163
  //-------------------------------------------------------
164
164
 
165
165
  #ifndef UNITY_LINE_TYPE
166
- #define UNITY_LINE_TYPE unsigned short
166
+ #define UNITY_LINE_TYPE _U_UINT
167
167
  #endif
168
168
 
169
169
  #ifndef UNITY_COUNTER_TYPE
170
- #define UNITY_COUNTER_TYPE unsigned short
170
+ #define UNITY_COUNTER_TYPE _U_UINT
171
171
  #endif
172
172
 
173
173
  //-------------------------------------------------------
@@ -219,7 +219,7 @@ struct _Unity
219
219
  {
220
220
  const char* TestFile;
221
221
  const char* CurrentTestName;
222
- _UU32 CurrentTestLineNumber;
222
+ UNITY_LINE_TYPE CurrentTestLineNumber;
223
223
  UNITY_COUNTER_TYPE NumberOfTests;
224
224
  UNITY_COUNTER_TYPE TestFailures;
225
225
  UNITY_COUNTER_TYPE TestIgnores;
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 0
7
- - 11
8
- - 2
9
- version: 0.11.2
7
+ - 12
8
+ - 0
9
+ version: 0.12.0
10
10
  platform: ruby
11
11
  authors:
12
12
  - Mike Karlesky, Mark VanderVoord
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2011-12-27 00:00:00 -05:00
19
+ date: 2012-02-23 00:00:00 -05:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
@@ -67,6 +67,21 @@ files:
67
67
  - bin/ceedling
68
68
  - ceedling-gem.sublime-project
69
69
  - ceedling.gemspec
70
+ - examples/blinky/project.yml
71
+ - examples/blinky/rakefile.rb
72
+ - examples/blinky/src/BlinkTask.c
73
+ - examples/blinky/src/BlinkTask.h
74
+ - examples/blinky/src/Configure.c
75
+ - examples/blinky/src/Configure.h
76
+ - examples/blinky/src/main.c
77
+ - examples/blinky/src/main.h
78
+ - examples/blinky/test/support/stub_interrupt.h
79
+ - examples/blinky/test/support/stub_io.h
80
+ - examples/blinky/test/support/stub_iom328p.h
81
+ - examples/blinky/test/support/stub_sfr_defs.h
82
+ - examples/blinky/test/test_BlinkTask.c
83
+ - examples/blinky/test/test_Configure.c
84
+ - examples/blinky/test/test_main.c
70
85
  - examples/temp_sensor/project.yml
71
86
  - examples/temp_sensor/rakefile.rb
72
87
  - examples/temp_sensor/src/AT91SAM7X256.h