Sha256: cd3c39af17912da0d954aab52cb434bd747ac52520f9f8cc00eab16ade4f8cd4

Contents?: true

Size: 1.33 KB

Versions: 2

Compression:

Stored size: 1.33 KB

Contents

# =========================================================================
#   CMock - Automatic Mock Generation for C
#   ThrowTheSwitch.org
#   Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
#   SPDX-License-Identifier: MIT
# =========================================================================

---
#The purpose of this test is to pull in some standard library stuff from C99
:cmock:
  :includes:
    - "<stdint.h>"
    - "<limits.h>"

:systest:
  :types: |
    #include <stdint.h>
    #include <limits.h>
  
  
  :mockable: |
    int32_t foo(int32_t a);

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

    :code: |
      int8_t function_a(void) {
        return (int8_t)(INT_MIN == foo(INT_MAX));
      }
      
  :tests:
    :common: |
      void setUp(void) {}
      void tearDown(void) {}
      
    :units:
    - :pass: TRUE
      :should: 'handle handle a simple comparison of C99 types which pass'
      :code: |
        test()
        {
          foo_ExpectAndReturn(INT_MAX, INT_MIN);
          
          TEST_ASSERT_TRUE(function_a());
        }

    - :pass: FALSE
      :should: 'handle handle a simple comparison of C99 types which fail'
      :code: |
        test()
        {
          foo_ExpectAndReturn(INT_MIN, INT_MIN);
          
          TEST_ASSERT_TRUE(function_a());
        }
        
...

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ceedling-1.0.1 vendor/cmock/test/system/test_interactions/newer_standards_stuff1.yml
ceedling-1.0.0 vendor/cmock/test/system/test_interactions/newer_standards_stuff1.yml