Sha256: f51bae36303d532e357105195369615ab17560234efb1f0141973c2794ac0693

Contents?: true

Size: 1.48 KB

Versions: 22

Compression:

Stored size: 1.48 KB

Contents

---
#The purpose of this test is to play with our really rough multidimensional array support, which involves an implicit cast not supported everywhere
:cmock:
  :plugins:
  - :array

:systest:
  :types: |


  :mockable: |
    void foo(unsigned char** a);
    unsigned char** bar(void);

  :source:
    :header: |
      void function_a(void);

    :code: |
      void function_a(void) {
        foo(bar());
      }

  :tests:
    :common: |
      void setUp(void) {}
      void tearDown(void) {}

    :units:
    - :pass: TRUE
      :should: 'handle two dimensional array of unsigned characters just like we would handle a single dimensional array in expect (where we really only care about first element)'
      :code: |
        test()
        {
          unsigned char a[] = { 1, 2, 3, 4, 5, 6 };
          unsigned char** pa = (unsigned char**)(&a);

          bar_ExpectAndReturn(pa);
          foo_Expect(pa);

          function_a();
        }

    - :pass: FALSE
      :should: 'handle two dimensional array of unsigned characters just like we would handle a single dimensional array in expect as failures (where we really only care about first element)'
      :code: |
        test()
        {
          unsigned char a[] = { 1, 2, 3, 4, 5, 6 };
          unsigned char b[] = { 5, 6, 7, 8, 9, 0 };
          unsigned char** pa = (unsigned char**)(&a);
          unsigned char** pb = (unsigned char**)(&b);

          bar_ExpectAndReturn(pa);
          foo_Expect(pb);

          function_a();
        }
...

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
ceedling-0.31.1 vendor/cmock/test/system/test_interactions/nonstandard_parsed_stuff_2.yml
ceedling-0.31.0 vendor/cmock/test/system/test_interactions/nonstandard_parsed_stuff_2.yml
ceedling-0.30.0 vendor/cmock/test/system/test_interactions/nonstandard_parsed_stuff_2.yml
ceedling-0.28.3 vendor/cmock/test/system/test_interactions/nonstandard_parsed_stuff_2.yml
ceedling-0.28.2 vendor/cmock/test/system/test_interactions/nonstandard_parsed_stuff_2.yml
ceedling-0.28.1 vendor/cmock/test/system/test_interactions/nonstandard_parsed_stuff_2.yml
ceedling-0.27.0 vendor/cmock/test/system/test_interactions/nonstandard_parsed_stuff_2.yml
ceedling-0.25.0 vendor/cmock/test/system/test_interactions/nonstandard_parsed_stuff_2.yml
ceedling-0.24.0 vendor/cmock/test/system/test_interactions/nonstandard_parsed_stuff_2.yml
ceedling-0.22.0 vendor/cmock/test/system/test_interactions/nonstandard_parsed_stuff_2.yml
ceedling-0.21.0 vendor/cmock/test/system/test_interactions/nonstandard_parsed_stuff_2.yml
ceedling-0.20.3 vendor/cmock/test/system/test_interactions/nonstandard_parsed_stuff_2.yml
ceedling-0.20.2 vendor/cmock/test/system/test_interactions/nonstandard_parsed_stuff_2.yml
ceedling-0.19.0 vendor/cmock/test/system/test_interactions/nonstandard_parsed_stuff_2.yml
ceedling-0.18.0 vendor/cmock/test/system/test_interactions/nonstandard_parsed_stuff_2.yml
ceedling-0.17.0 vendor/cmock/test/system/test_interactions/nonstandard_parsed_stuff_2.yml
ceedling-0.16.0 vendor/cmock/test/system/test_interactions/nonstandard_parsed_stuff_2.yml
ceedling-0.15.6 vendor/cmock/test/system/test_interactions/nonstandard_parsed_stuff_2.yml
ceedling-0.15.5 vendor/cmock/test/system/test_interactions/nonstandard_parsed_stuff_2.yml
ceedling-0.15.4 vendor/cmock/test/system/test_interactions/nonstandard_parsed_stuff_2.yml