testownie
This commit is contained in:
3
.vscode/c_cpp_properties.json
vendored
3
.vscode/c_cpp_properties.json
vendored
@@ -8,7 +8,8 @@
|
|||||||
"/var/lib/gems/2.7.0/gems/ceedling-0.31.0/vendor/cmock/src/"
|
"/var/lib/gems/2.7.0/gems/ceedling-0.31.0/vendor/cmock/src/"
|
||||||
],
|
],
|
||||||
"defines": [
|
"defines": [
|
||||||
"STM32F303xE"
|
"STM32F303xE",
|
||||||
|
"TEST"
|
||||||
],
|
],
|
||||||
"compilerPath": "/usr/bin/gcc",
|
"compilerPath": "/usr/bin/gcc",
|
||||||
"cStandard": "gnu17",
|
"cStandard": "gnu17",
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
:build_root: build
|
:build_root: build
|
||||||
# :release_build: TRUE
|
# :release_build: TRUE
|
||||||
:test_file_prefix: test_
|
:test_file_prefix: test_
|
||||||
:which_ceedling: vendor/ceedling
|
:which_ceedling: gem
|
||||||
:ceedling_version: 0.31.0
|
:ceedling_version: 0.31.0
|
||||||
:default_tasks:
|
:default_tasks:
|
||||||
- test:all
|
- test:all
|
||||||
@@ -46,7 +46,7 @@
|
|||||||
# 2) add entries to the :common: section (e.g. :test: has TEST defined)
|
# 2) add entries to the :common: section (e.g. :test: has TEST defined)
|
||||||
:common: &common_defines
|
:common: &common_defines
|
||||||
- STM32F303xE
|
- STM32F303xE
|
||||||
- CMOCK_MEM_PTR_AS_INT=uint32_t
|
# - CMOCK_MEM_PTR_AS_INT=uint32_t
|
||||||
:test:
|
:test:
|
||||||
- *common_defines
|
- *common_defines
|
||||||
- TEST
|
- TEST
|
||||||
@@ -131,7 +131,7 @@
|
|||||||
|
|
||||||
:plugins:
|
:plugins:
|
||||||
:load_paths:
|
:load_paths:
|
||||||
- vendor/ceedling/plugins
|
- "#{Ceedling.load_path}"
|
||||||
:enabled:
|
:enabled:
|
||||||
- stdout_pretty_tests_report
|
- stdout_pretty_tests_report
|
||||||
- module_generator
|
- module_generator
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
// DMA_InitTypeDef * mydef;
|
// DMA_InitTypeDef * mydef;
|
||||||
void setUp(void)
|
void setUp(void)
|
||||||
{
|
{
|
||||||
// memset( buffer_oled, 0xFF, SSD1306_BUF_SIZE);
|
memset( buffer_oled, 0xFF, SSD1306_BUF_SIZE);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -25,7 +25,23 @@ void test_tempSensor_NeedToImplement(void)
|
|||||||
{
|
{
|
||||||
// TEST_IGNORE_MESSAGE("Need to Implement tempSensor");
|
// TEST_IGNORE_MESSAGE("Need to Implement tempSensor");
|
||||||
// TEST_ASSERT_TRUE(1);
|
// TEST_ASSERT_TRUE(1);
|
||||||
buffer_oled[0] = 0xFF;
|
// buffer_oled[0] = 0xFF;
|
||||||
TEST_ASSERT_EQUAL_HEX(0xFF, buffer_oled[0]);
|
TEST_ASSERT_EQUAL_HEX(0xFF, buffer_oled[0]);
|
||||||
// TEST_ASSERT_NOT_NULL(mydef);
|
// TEST_ASSERT_NOT_NULL(mydef);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void test_wrtie_to_buffer_at_pos_0_0(void)
|
||||||
|
{
|
||||||
|
uint8_t data[8] = {};
|
||||||
|
ssd1306_write_to_buffer(data, 8, 8, 0, 0);
|
||||||
|
TEST_ASSERT_EQUAL_UINT8(0, buffer_oled[0]);
|
||||||
|
TEST_ASSERT_EQUAL_UINT8(0, buffer_oled[1]);
|
||||||
|
TEST_ASSERT_EQUAL_UINT8(0, buffer_oled[2]);
|
||||||
|
TEST_ASSERT_EQUAL_UINT8(0, buffer_oled[3]);
|
||||||
|
TEST_ASSERT_EQUAL_UINT8(0, buffer_oled[4]);
|
||||||
|
TEST_ASSERT_EQUAL_UINT8(0, buffer_oled[5]);
|
||||||
|
TEST_ASSERT_EQUAL_UINT8(0, buffer_oled[6]);
|
||||||
|
TEST_ASSERT_EQUAL_UINT8(0, buffer_oled[7]);
|
||||||
|
TEST_ASSERT_EQUAL_UINT8(0xFF, buffer_oled[8]);
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user