Assertions and utilities for graphics tests.
More...
#include <Uefi.h>
#include <UEFIStarter/graphics.h>
Go to the source code of this file.
|
void | init_graphics_difftest_ex (graphics_difftest_t *difftest, INTN width, INTN height, UINT32 bgcol) |
| Initializes a graphics difference test. More...
|
|
void | init_graphics_difftest (graphics_difftest_t *difftest, INTN width, INTN height) |
| Initializes a default graphics difference test. More...
|
|
void | find_bounding_box_for_changes (graphics_difftest_t *difftest) |
| Compares "before" and "after" images of a difference test and determines the bounding box changes happened in. More...
|
|
void | assert_box_equals (bounding_box_t *box, INTN left, INTN top, INTN right, INTN bottom, CHAR16 *message) |
| Asserts a bounding box matches expected values. More...
|
|
void | assert_differences_within_box (graphics_difftest_t *difftest, INTN min_width, INTN max_width, INTN min_height, INTN max_height, CHAR16 *message) |
| Asserts the bounding box of changes is within given ranges of width and height. More...
|
|
void | reset_bounding_box (bounding_box_t *box) |
| Initializes a bounding box. More...
|
|
void | reset_graphics_difftest (graphics_difftest_t *difftest) |
| Resets a graphics difference test. More...
|
|
void | destroy_graphics_difftest (graphics_difftest_t *difftest) |
| Destroys a graphics difference test structure. More...
|
|
Assertions and utilities for graphics tests.
- Author
- Richard Nusser
- Copyright
- 2017-2018 Richard Nusser
- License
- GPLv3 (see http://www.gnu.org/licenses/)
- See also
- https://github.com/rinusser/UEFIStarter
◆ init_graphics_difftest_ex()
void init_graphics_difftest_ex |
( |
graphics_difftest_t * |
difftest, |
|
|
INTN |
width, |
|
|
INTN |
height, |
|
|
UINT32 |
bgcol |
|
) |
| |
Initializes a graphics difference test.
- Parameters
-
difftest | the difference test to reset |
width | the compared images' width |
height | the compared images' height |
bgcol | the background color to paint "before" and "after" images with |
◆ init_graphics_difftest()
Initializes a default graphics difference test.
- Parameters
-
difftest | the difference test to reset |
width | the compared images' width |
height | the compared images' height |
◆ find_bounding_box_for_changes()
Compares "before" and "after" images of a difference test and determines the bounding box changes happened in.
- Parameters
-
difftest | the difference test to update |
◆ assert_box_equals()
void assert_box_equals |
( |
bounding_box_t * |
box, |
|
|
INTN |
left, |
|
|
INTN |
top, |
|
|
INTN |
right, |
|
|
INTN |
bottom, |
|
|
CHAR16 * |
message |
|
) |
| |
Asserts a bounding box matches expected values.
- Parameters
-
box | the actual bounding box |
left | the expected left coordinate |
top | the expected top coordinate |
right | the expected right coordinate |
bottom | the expected bottom coordinate |
message | a descriptive message of what's being tested |
◆ assert_differences_within_box()
void assert_differences_within_box |
( |
graphics_difftest_t * |
difftest, |
|
|
INTN |
min_width, |
|
|
INTN |
max_width, |
|
|
INTN |
min_height, |
|
|
INTN |
max_height, |
|
|
CHAR16 * |
message |
|
) |
| |
Asserts the bounding box of changes is within given ranges of width and height.
- Parameters
-
difftest | the difference test to check |
min_width | the smallest allowed bounding box width |
max_width | the largest allowed bounding box width |
min_height | the smallest allowed bounding box height |
max_height | the largest allowed bounding box height |
message | a descriptive message of what's being tested |
◆ reset_bounding_box()
Initializes a bounding box.
- Parameters
-
box | the bounding box to reset |
◆ reset_graphics_difftest()
Resets a graphics difference test.
Initializes the expected bounding box and resets the "after" image.
- Parameters
-
difftest | the difference test to reset |
◆ destroy_graphics_difftest()
Destroys a graphics difference test structure.
- Parameters
-
difftest | the difference test to destroy |