mirror of
https://github.com/ThrowTheSwitch/CMock.git
synced 2026-09-01 15:59:59 +00:00
45 lines
970 B
YAML
45 lines
970 B
YAML
# =========================================================================
|
|
# CMock - Automatic Mock Generation for C
|
|
# ThrowTheSwitch.org
|
|
# Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
|
# SPDX-License-Identifier: MIT
|
|
# =========================================================================
|
|
|
|
---
|
|
:cmock:
|
|
:plugins:
|
|
- 'ignore'
|
|
:fail_on_unexpected_calls: FALSE
|
|
|
|
:systest:
|
|
:types: |
|
|
|
|
:mockable: |
|
|
int foo(int a);
|
|
void bar(int b);
|
|
|
|
:source:
|
|
:header: |
|
|
int function(int a, int b, int c);
|
|
:code: |
|
|
int function(int a, int b, int c)
|
|
{
|
|
bar(b);
|
|
return foo(a) + foo(b) + foo(c);
|
|
}
|
|
|
|
:tests:
|
|
:common: |
|
|
void setUp(void) {}
|
|
void tearDown(void) {}
|
|
:units:
|
|
- :pass: TRUE
|
|
:should: 'With "fail_on_unexpected_calls" disabled, Expect/Ignore/... of bar is NOT required.'
|
|
:code: |
|
|
test()
|
|
{
|
|
function(1, 2, 3);
|
|
}
|
|
|
|
...
|