Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
mbed-cloud-client/mbed-client-pal/Test/Unity/test/testdata/mocksample.c@0:276e7a263c35, 2018-07-02 (annotated)
- Committer:
- MACRUM
- Date:
- Mon Jul 02 06:30:39 2018 +0000
- Revision:
- 0:276e7a263c35
Initial commit
Who changed what in which revision?
| User | Revision | Line number | New contents of line | 
|---|---|---|---|
| MACRUM | 0:276e7a263c35 | 1 | // This is just a sample test file to be used to test the generator script | 
| MACRUM | 0:276e7a263c35 | 2 | #ifndef TEST_SAMPLE_H | 
| MACRUM | 0:276e7a263c35 | 3 | #define TEST_SAMPLE_H | 
| MACRUM | 0:276e7a263c35 | 4 | |
| MACRUM | 0:276e7a263c35 | 5 | #include <setjmp.h> | 
| MACRUM | 0:276e7a263c35 | 6 | #include "unity.h" | 
| MACRUM | 0:276e7a263c35 | 7 | #include "funky.h" | 
| MACRUM | 0:276e7a263c35 | 8 | #include "Mockstanky.h" | 
| MACRUM | 0:276e7a263c35 | 9 | |
| MACRUM | 0:276e7a263c35 | 10 | void setUp(void) | 
| MACRUM | 0:276e7a263c35 | 11 | { | 
| MACRUM | 0:276e7a263c35 | 12 | CustomSetupStuff(); | 
| MACRUM | 0:276e7a263c35 | 13 | } | 
| MACRUM | 0:276e7a263c35 | 14 | |
| MACRUM | 0:276e7a263c35 | 15 | void tearDown(void) | 
| MACRUM | 0:276e7a263c35 | 16 | { | 
| MACRUM | 0:276e7a263c35 | 17 | CustomTeardownStuff | 
| MACRUM | 0:276e7a263c35 | 18 | } | 
| MACRUM | 0:276e7a263c35 | 19 | |
| MACRUM | 0:276e7a263c35 | 20 | //Yup, nice comment | 
| MACRUM | 0:276e7a263c35 | 21 | void test_TheFirstThingToTest(void) | 
| MACRUM | 0:276e7a263c35 | 22 | { | 
| MACRUM | 0:276e7a263c35 | 23 | TEST_ASSERT(1); | 
| MACRUM | 0:276e7a263c35 | 24 | |
| MACRUM | 0:276e7a263c35 | 25 | TEST_ASSERT_TRUE(1); | 
| MACRUM | 0:276e7a263c35 | 26 | } | 
| MACRUM | 0:276e7a263c35 | 27 | |
| MACRUM | 0:276e7a263c35 | 28 | /* | 
| MACRUM | 0:276e7a263c35 | 29 | void test_ShouldBeIgnored(void) | 
| MACRUM | 0:276e7a263c35 | 30 | { | 
| MACRUM | 0:276e7a263c35 | 31 | DoesStuff(); | 
| MACRUM | 0:276e7a263c35 | 32 | } | 
| MACRUM | 0:276e7a263c35 | 33 | */ | 
| MACRUM | 0:276e7a263c35 | 34 | |
| MACRUM | 0:276e7a263c35 | 35 | //void test_ShouldAlsoNotBeTested(void) | 
| MACRUM | 0:276e7a263c35 | 36 | //{ | 
| MACRUM | 0:276e7a263c35 | 37 | // Call_An_Expect(); | 
| MACRUM | 0:276e7a263c35 | 38 | // | 
| MACRUM | 0:276e7a263c35 | 39 | // CallAFunction(); | 
| MACRUM | 0:276e7a263c35 | 40 | // test_CallAFunctionThatLooksLikeATest(); | 
| MACRUM | 0:276e7a263c35 | 41 | //} | 
| MACRUM | 0:276e7a263c35 | 42 | |
| MACRUM | 0:276e7a263c35 | 43 | void test_TheSecondThingToTest(void) | 
| MACRUM | 0:276e7a263c35 | 44 | { | 
| MACRUM | 0:276e7a263c35 | 45 | Call_An_Expect(); | 
| MACRUM | 0:276e7a263c35 | 46 | |
| MACRUM | 0:276e7a263c35 | 47 | CallAFunction(); | 
| MACRUM | 0:276e7a263c35 | 48 | test_CallAFunctionThatLooksLikeATest(); | 
| MACRUM | 0:276e7a263c35 | 49 | } | 
| MACRUM | 0:276e7a263c35 | 50 | |
| MACRUM | 0:276e7a263c35 | 51 | #endif //TEST_SAMPLE_H |