mirror of
https://github.com/meekrosoft/fff
synced 2026-01-23 16:35:59 +01:00
commit e5a5749971eb9274679699020a54c91d4053ed79 Author: James Fraser <wulfgar.pro@gmail.com> Date: Sun Feb 3 19:57:31 2019 +1100 PR #47: Minor review fixes to tests files. commit e9f11b9ec8de8f8d1f0de7b6959c575e15894526 Author: James Fraser <wulfgar.pro@gmail.com> Date: Sun Feb 3 19:57:04 2019 +1100 PR #47: Minor review fixes. commit0a7fbeceecAuthor: Pauli Salmenrinne <pauli.salmenrinne@pexraytech.com> Date: Tue Jan 22 15:11:10 2019 +0200 Add example for the weak linking commit647737304dAuthor: susundberg <susundberg@gmail.com> Date: Wed Mar 21 13:14:05 2018 +0200 Add "FFF_FUNCTION_ATTRIBUTES" definition that can be used to declare attributes for functions. More specifically, allow __weak__ attribute.
24 lines
435 B
C
24 lines
435 B
C
#include <stdio.h>
|
|
|
|
#include "test_common.h"
|
|
|
|
#include "sensor.h"
|
|
#include "sensor.fake.h"
|
|
|
|
DEFINE_FFF_GLOBALS;
|
|
|
|
|
|
int main(void)
|
|
{
|
|
init_tests();
|
|
|
|
assert( sensor_init() == true );
|
|
|
|
TEST_sensor_generate_data( GLOBAL_TEST_bus_read_ret, 1.5f );
|
|
float value = sensor_read();
|
|
float value_error = value - 1.5f;
|
|
assert( value_error < 0.1f && value_error > -0.1f );
|
|
printf("Test " __FILE__ " ok\n");
|
|
return 0;
|
|
}
|