write_to_buffer wszystkie testy pomyslne

This commit is contained in:
2021-05-30 13:43:25 +02:00
parent 02dca8c008
commit 8189b0b947
5 changed files with 415 additions and 95 deletions

View File

@@ -20,7 +20,7 @@ void tearDown(void)
void test_wrtie_to_buffer_at_pos_0_0_height_8pt(void)
{
// uint8_t data[8] = {};
next(picture_8pt, SSD1306_LCDWIDTH, 8, 0, 0);
ssd1306_write_to_buffer(picture_8pt, SSD1306_LCDWIDTH, 8, 0, 0);
TEST_ASSERT_EQUAL_UINT8_ARRAY(posX_0_posY_0_8pt, buffer_oled, SSD1306_BUF_SIZE);
// TEST_ASSERT_EQUAL_UINT8(0xFF, buffer_oled[8]);
@@ -29,14 +29,14 @@ void test_wrtie_to_buffer_at_pos_0_0_height_8pt(void)
void test_wrtie_to_buffer_at_pos_1_0_height_8pt(void)
{
// uint8_t data[8] = {};
next(picture_8pt, SSD1306_LCDWIDTH, 8, 0, 1);
ssd1306_write_to_buffer(picture_8pt, SSD1306_LCDWIDTH, 8, 0, 1);
TEST_ASSERT_EQUAL_UINT8_ARRAY(posX_0_posY_1_8pt, buffer_oled, SSD1306_BUF_SIZE);
}
void test_wrtie_to_buffer_at_pos_7_0_height_8pt(void)
{
next(picture_8pt, SSD1306_LCDWIDTH, 8, 0, 7);
ssd1306_write_to_buffer(picture_8pt, SSD1306_LCDWIDTH, 8, 0, 7);
TEST_ASSERT_EQUAL_UINT8_ARRAY(posX_0_posY_7_8pt, buffer_oled, SSD1306_BUF_SIZE);
}
@@ -44,7 +44,7 @@ void test_wrtie_to_buffer_at_pos_7_0_height_8pt(void)
void test_wrtie_to_buffer_at_pos_0_0_height_16pt(void)
{
// uint8_t data[8] = {};
next(picture_16pt, SSD1306_LCDWIDTH, 16, 0, 0);
ssd1306_write_to_buffer(picture_16pt, SSD1306_LCDWIDTH, 16, 0, 0);
TEST_ASSERT_EQUAL_UINT8_ARRAY(posX_0_posY_0_16pt, buffer_oled, SSD1306_BUF_SIZE);
// TEST_ASSERT_EQUAL_UINT8(0xFF, buffer_oled[8]);
@@ -53,14 +53,14 @@ void test_wrtie_to_buffer_at_pos_0_0_height_16pt(void)
void test_wrtie_to_buffer_at_pos_1_0_height_16pt(void)
{
// uint8_t data[8] = {};
next(picture_16pt, SSD1306_LCDWIDTH, 16, 0, 1);
ssd1306_write_to_buffer(picture_16pt, SSD1306_LCDWIDTH, 16, 0, 1);
TEST_ASSERT_EQUAL_UINT8_ARRAY(posX_0_posY_1_16pt, buffer_oled, SSD1306_BUF_SIZE);
}
void test_wrtie_to_buffer_at_pos_7_0_height_16pt(void)
{
next(picture_16pt, SSD1306_LCDWIDTH, 16, 0, 7);
ssd1306_write_to_buffer(picture_16pt, SSD1306_LCDWIDTH, 16, 0, 7);
TEST_ASSERT_EQUAL_UINT8_ARRAY(posX_0_posY_7_16pt, buffer_oled, SSD1306_BUF_SIZE);
}
@@ -68,7 +68,7 @@ void test_wrtie_to_buffer_at_pos_7_0_height_16pt(void)
void test_wrtie_to_buffer_at_pos_0_0_height_12pt(void)
{
// uint8_t data[8] = {};
next(picture_12pt, SSD1306_LCDWIDTH, 12, 0, 0);
ssd1306_write_to_buffer(picture_12pt, SSD1306_LCDWIDTH, 12, 0, 0);
TEST_ASSERT_EQUAL_UINT8_ARRAY(posX_0_posY_0_12pt, buffer_oled, SSD1306_BUF_SIZE);
// TEST_ASSERT_EQUAL_UINT8(0xFF, buffer_oled[8]);
@@ -77,7 +77,7 @@ void test_wrtie_to_buffer_at_pos_0_0_height_12pt(void)
void test_wrtie_to_buffer_at_pos_1_0_height_12pt(void)
{
// uint8_t data[8] = {};
next(picture_12pt, SSD1306_LCDWIDTH, 12, 0, 1);
ssd1306_write_to_buffer(picture_12pt, SSD1306_LCDWIDTH, 12, 0, 1);
TEST_ASSERT_EQUAL_UINT8_ARRAY(posX_0_posY_1_12pt, buffer_oled, SSD1306_BUF_SIZE);
}
@@ -85,7 +85,7 @@ void test_wrtie_to_buffer_at_pos_1_0_height_12pt(void)
void test_wrtie_to_buffer_at_pos_0_4_height_12pt(void)
{
// uint8_t data[8] = {};
next(picture_12pt, SSD1306_LCDWIDTH, 12, 0, 4);
ssd1306_write_to_buffer(picture_12pt, SSD1306_LCDWIDTH, 12, 0, 4);
TEST_ASSERT_EQUAL_UINT8_ARRAY(posX_0_posY_4_12pt, buffer_oled, SSD1306_BUF_SIZE);
// TEST_ASSERT_EQUAL_UINT8(0xFF, buffer_oled[8]);
@@ -93,7 +93,42 @@ void test_wrtie_to_buffer_at_pos_0_4_height_12pt(void)
void test_wrtie_to_buffer_at_pos_7_0_height_12pt(void)
{
next(picture_12pt, SSD1306_LCDWIDTH, 12, 0, 7);
ssd1306_write_to_buffer(picture_12pt, SSD1306_LCDWIDTH, 12, 0, 7);
TEST_ASSERT_EQUAL_HEX8_ARRAY(posX_0_posY_7_12pt, buffer_oled, SSD1306_BUF_SIZE);
}
void test_wrtie_to_buffer_at_pos_minus1_0_height_8pt(void)
{
ssd1306_write_to_buffer(picture_8pt, SSD1306_LCDWIDTH, 8, 0, -1);
TEST_ASSERT_EQUAL_HEX8_ARRAY(posX_0_posY_minus1_8pt, buffer_oled, SSD1306_BUF_SIZE);
}
void test_wrtie_to_buffer_at_pos_minus7_0_height_8pt(void)
{
ssd1306_write_to_buffer(picture_8pt, SSD1306_LCDWIDTH, 8, 0, -7);
TEST_ASSERT_EQUAL_HEX8_ARRAY(posX_0_posY_minus7_8pt, buffer_oled, SSD1306_BUF_SIZE);
}
void test_wrtie_to_buffer_at_pos_minus8_0_height_8pt(void)
{
ssd1306_write_to_buffer(picture_8pt, SSD1306_LCDWIDTH, 8, 0, -8);
TEST_ASSERT_EQUAL_HEX8_ARRAY(buffer_oled, buffer_oled, SSD1306_BUF_SIZE);
}
void test_wrtie_to_buffer_at_pos_0_minus1_height_8pt(void)
{
ssd1306_write_to_buffer(picture_8pt, SSD1306_LCDWIDTH, 8, -1, 0);
TEST_ASSERT_EQUAL_HEX8_ARRAY(posX_minus1_posY_0_8pt, buffer_oled, SSD1306_BUF_SIZE);
}
void test_wrtie_to_buffer_at_pos_60_minus1_height_8pt(void)
{
ssd1306_write_to_buffer(picture_8pt, SSD1306_LCDWIDTH, 8, -1, 60);
TEST_ASSERT_EQUAL_HEX8_ARRAY(posX_minus1_posY_60_8pt, buffer_oled, SSD1306_BUF_SIZE);
}