sprzatanie test_SSD1306_oled
This commit is contained in:
@@ -5,7 +5,6 @@
|
|||||||
#include "buffer_oled_expect.h"
|
#include "buffer_oled_expect.h"
|
||||||
#include "string.h"
|
#include "string.h"
|
||||||
|
|
||||||
// DMA_InitTypeDef * mydef;
|
|
||||||
void setUp(void)
|
void setUp(void)
|
||||||
{
|
{
|
||||||
memset( buffer_oled, 0xFF, SSD1306_BUF_SIZE);
|
memset( buffer_oled, 0xFF, SSD1306_BUF_SIZE);
|
||||||
@@ -19,16 +18,13 @@ void tearDown(void)
|
|||||||
|
|
||||||
void test_wrtie_to_buffer_at_pos_0_0_height_8pt(void)
|
void test_wrtie_to_buffer_at_pos_0_0_height_8pt(void)
|
||||||
{
|
{
|
||||||
// uint8_t data[8] = {};
|
|
||||||
SSD1306_write_to_buffer(picture_8pt, SSD1306_LCDWIDTH, 8, 0, 0, WHITE);
|
SSD1306_write_to_buffer(picture_8pt, SSD1306_LCDWIDTH, 8, 0, 0, WHITE);
|
||||||
|
|
||||||
TEST_ASSERT_EQUAL_UINT8_ARRAY(posX_0_posY_0_8pt, buffer_oled, SSD1306_BUF_SIZE);
|
TEST_ASSERT_EQUAL_UINT8_ARRAY(posX_0_posY_0_8pt, buffer_oled, SSD1306_BUF_SIZE);
|
||||||
// TEST_ASSERT_EQUAL_UINT8(0xFF, buffer_oled[8]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_wrtie_to_buffer_at_pos_1_0_height_8pt(void)
|
void test_wrtie_to_buffer_at_pos_1_0_height_8pt(void)
|
||||||
{
|
{
|
||||||
// uint8_t data[8] = {};
|
|
||||||
SSD1306_write_to_buffer(picture_8pt, SSD1306_LCDWIDTH, 8, 0, 1, WHITE);
|
SSD1306_write_to_buffer(picture_8pt, SSD1306_LCDWIDTH, 8, 0, 1, WHITE);
|
||||||
|
|
||||||
TEST_ASSERT_EQUAL_UINT8_ARRAY(posX_0_posY_1_8pt, buffer_oled, SSD1306_BUF_SIZE);
|
TEST_ASSERT_EQUAL_UINT8_ARRAY(posX_0_posY_1_8pt, buffer_oled, SSD1306_BUF_SIZE);
|
||||||
@@ -43,16 +39,13 @@ void test_wrtie_to_buffer_at_pos_7_0_height_8pt(void)
|
|||||||
|
|
||||||
void test_wrtie_to_buffer_at_pos_0_0_height_16pt(void)
|
void test_wrtie_to_buffer_at_pos_0_0_height_16pt(void)
|
||||||
{
|
{
|
||||||
// uint8_t data[8] = {};
|
|
||||||
SSD1306_write_to_buffer(picture_16pt, SSD1306_LCDWIDTH, 16, 0, 0, WHITE);
|
SSD1306_write_to_buffer(picture_16pt, SSD1306_LCDWIDTH, 16, 0, 0, WHITE);
|
||||||
|
|
||||||
TEST_ASSERT_EQUAL_UINT8_ARRAY(posX_0_posY_0_16pt, buffer_oled, SSD1306_BUF_SIZE);
|
TEST_ASSERT_EQUAL_UINT8_ARRAY(posX_0_posY_0_16pt, buffer_oled, SSD1306_BUF_SIZE);
|
||||||
// TEST_ASSERT_EQUAL_UINT8(0xFF, buffer_oled[8]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_wrtie_to_buffer_at_pos_1_0_height_16pt(void)
|
void test_wrtie_to_buffer_at_pos_1_0_height_16pt(void)
|
||||||
{
|
{
|
||||||
// uint8_t data[8] = {};
|
|
||||||
SSD1306_write_to_buffer(picture_16pt, SSD1306_LCDWIDTH, 16, 0, 1, WHITE);
|
SSD1306_write_to_buffer(picture_16pt, SSD1306_LCDWIDTH, 16, 0, 1, WHITE);
|
||||||
|
|
||||||
TEST_ASSERT_EQUAL_UINT8_ARRAY(posX_0_posY_1_16pt, buffer_oled, SSD1306_BUF_SIZE);
|
TEST_ASSERT_EQUAL_UINT8_ARRAY(posX_0_posY_1_16pt, buffer_oled, SSD1306_BUF_SIZE);
|
||||||
@@ -67,16 +60,13 @@ void test_wrtie_to_buffer_at_pos_7_0_height_16pt(void)
|
|||||||
|
|
||||||
void test_wrtie_to_buffer_at_pos_0_0_height_12pt(void)
|
void test_wrtie_to_buffer_at_pos_0_0_height_12pt(void)
|
||||||
{
|
{
|
||||||
// uint8_t data[8] = {};
|
|
||||||
SSD1306_write_to_buffer(picture_12pt, SSD1306_LCDWIDTH, 12, 0, 0, WHITE);
|
SSD1306_write_to_buffer(picture_12pt, SSD1306_LCDWIDTH, 12, 0, 0, WHITE);
|
||||||
|
|
||||||
TEST_ASSERT_EQUAL_UINT8_ARRAY(posX_0_posY_0_12pt, buffer_oled, SSD1306_BUF_SIZE);
|
TEST_ASSERT_EQUAL_UINT8_ARRAY(posX_0_posY_0_12pt, buffer_oled, SSD1306_BUF_SIZE);
|
||||||
// TEST_ASSERT_EQUAL_UINT8(0xFF, buffer_oled[8]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_wrtie_to_buffer_at_pos_1_0_height_12pt(void)
|
void test_wrtie_to_buffer_at_pos_1_0_height_12pt(void)
|
||||||
{
|
{
|
||||||
// uint8_t data[8] = {};
|
|
||||||
SSD1306_write_to_buffer(picture_12pt, SSD1306_LCDWIDTH, 12, 0, 1, WHITE);
|
SSD1306_write_to_buffer(picture_12pt, SSD1306_LCDWIDTH, 12, 0, 1, WHITE);
|
||||||
|
|
||||||
TEST_ASSERT_EQUAL_UINT8_ARRAY(posX_0_posY_1_12pt, buffer_oled, SSD1306_BUF_SIZE);
|
TEST_ASSERT_EQUAL_UINT8_ARRAY(posX_0_posY_1_12pt, buffer_oled, SSD1306_BUF_SIZE);
|
||||||
@@ -84,11 +74,9 @@ void test_wrtie_to_buffer_at_pos_1_0_height_12pt(void)
|
|||||||
|
|
||||||
void test_wrtie_to_buffer_at_pos_0_4_height_12pt(void)
|
void test_wrtie_to_buffer_at_pos_0_4_height_12pt(void)
|
||||||
{
|
{
|
||||||
// uint8_t data[8] = {};
|
|
||||||
SSD1306_write_to_buffer(picture_12pt, SSD1306_LCDWIDTH, 12, 0, 4, WHITE);
|
SSD1306_write_to_buffer(picture_12pt, SSD1306_LCDWIDTH, 12, 0, 4, WHITE);
|
||||||
|
|
||||||
TEST_ASSERT_EQUAL_UINT8_ARRAY(posX_0_posY_4_12pt, buffer_oled, SSD1306_BUF_SIZE);
|
TEST_ASSERT_EQUAL_UINT8_ARRAY(posX_0_posY_4_12pt, buffer_oled, SSD1306_BUF_SIZE);
|
||||||
// TEST_ASSERT_EQUAL_UINT8(0xFF, buffer_oled[8]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_wrtie_to_buffer_at_pos_7_0_height_12pt(void)
|
void test_wrtie_to_buffer_at_pos_7_0_height_12pt(void)
|
||||||
|
|||||||
Reference in New Issue
Block a user