UEFIStarter
a simple UEFI framework
Test List
Global test_atoui64 ()
atoui64() parses integer strings from 0 to 2^64-1
Global test_boolean ()
assert_true() and assert_false() check C-style truthy values and can be inverted
Global test_bounding_box ()

find_bounding_box_for_changes() finds initial bounding box if there were no changes

find_bounding_box_for_changes() finds 1x1 bounding box if just one pixel changed

find_bounding_box_for_changes() finds narrow bounding box if a line of pixel changed

find_bounding_box_for_changes() finds arbitrary bounding box for given changes

find_bounding_box_for_changes() finds image-sized bounding box if changes span entire image

assert_box_equals() compares all struct members

Global test_compounds ()
assert_null() and assert_not_null() check for NULL values and can be inverted.
Global test_double ()

assert_double_near() asserts expected-epsilon <= actual <= expected+epsilon and can be inverted

assert_double_greater_than() asserts actual > expected and can be inverted

assert_double_greater_than_or_equal_to() asserts actual >= expected and can be inverted

Global test_draw_text ()

draw_text() writes text at the correct position

draw_text() blends semi-transparent glyphs onto background

Global test_find_pci_class_name ()

find_pci_class_name() finds entries with known class and subclass codes

find_pci_class_name() finds entries with known class and marks unknown subclasses

find_pci_class_name() marks unknown entries as such

Global test_find_pci_device_name ()

find_pci_device_name() finds entries with known vendor and device IDs

find_pci_device_name() finds known vendor entries and marks unknown device IDs

find_pci_device_name() marks unknown vendor IDs

find_pci_device_name() isn't affected by old strstr() bug

Global test_ftowcs ()

ftowcs() rounds positive and negative values to 2 decimals with "half away from zero"

ftowcs() always zero-pads to 2 decimals

Global test_ftowcs_boundaries ()
ftowcs() logs an error when trying to convert very low or very high numbers
Global test_get_file_contents ()
get_file_contents() returns a file's contents
Global test_graphics ()

assert_pixel() asserts pixel values match exactly and can be inverted

assert_pixel_near() asserts the sum of absolute differences between actual and expected pixels' channels is <=epsilon and can be inverted

Global test_integer ()

assert_intn_equals() asserts actual == expected and can be inverted

assert_intn_greater_than_or_equal_to() asserts actual >= expected and can be inverted

assert_intn_less_than_or_equal_to() asserts actual <= expected and can be inverted

assert_intn_in_closed_interval() asserts expected_lower <= actual <= expected_upper and can be inverted

Global test_interpolate_2px ()

interpolate_2px() uses second pixel for ratio 1.0

interpolate_2px() handles arbitrary points correctly

Global test_interpolate_4px ()

interpolate_4px() handles all 4 corners correctly

interpolate_4px() handles all 5 mid points correctly

interpolate_4px() handles arbitrary points correctly

Global test_logger ()

a log event at the current log level should be printed

a log event above the current log level should be printed

a log event below the current log level should be ignored

when the current log level is OFF all log events should be ignored

Global test_memsprintf ()
each call to memsprintf() should add exactly 1 tracked pool memory entry, regardless of how many arguments were passed.
Global test_page_tracking ()

stopping the memory tracker with unfreed tracked pages results in a logged error

freeing tracked pages twice shouldn't work and result in a logged error

stopping the memory tracker with unfreed untracked pages should not log an error

Global test_parse_glyphs ()

parse_glyphs() initializes the glyph list correctly

parse_glyphs() splits an input text of 4 characters into 4 glyphs

parse_glyphs() reads glyphs correctly when given a multiline input string

Global test_parse_parameters ()

not passing any parameters is OK

passing a parameter value a validator deems invalid results in parse failure

passing all valid values results in parse success

passing negative numbers to unsigned integer parameters results in parse failure

can supply logging parameters on command-line

Global test_parse_pbm_image_data ()
parse_pbm_image_data() reads correct dimensions and pixel values
Global test_parse_pgm_image_data ()
parse_pgm_image_data() reads correct dimensions and pixel values
Global test_parse_ppm_image_data ()
parse_ppm_image_data() reads correct dimensions and pixel values
Global test_pool_tracking ()
free_pool_memory_entries() should return the number of freed pool memory entries
Global test_rotate_image ()
rotate_image() rotates images clockwise for positive angles and counter-clockwise for negative angles
Global test_runner_empty ()
tests without any assertions are marked as incomplete
Global test_runner_failure ()
making a failing assertion results in FAILURE for the test
Global test_runner_incomplete_failure ()
marking a test incomplete when there are failed assertions results in INCOMPLETE but failure for the test
Global test_runner_incomplete_success ()
marking a test incomplete when there are successful assertions results in INCOMPLETE but success for the test
Global test_runner_success ()
making a successful assertion results in SUCCESS for the test
Global test_split_string ()

split_string() returns 0 entries and writes NULL when requested to split a NULL string

split_string() splits a string by the given delimiter into the correct parts

split_string() includes empty string parts between delimiters

split_string() returns 1 entry and outputs the input string as array when requested to split an empty string

Global test_sprint_status ()

sprint_status() includes the given function's name in the result

sprint_status() includes the raw EFI_STATUS code in the result

sprint_status() converts EFI_STATUS codes to readable messages in the result

Global test_struct_sizes ()

ac97_bar_t's size is exactly 128 bytes, as required by AC'97 specs

ac97_buffer_descriptor_t's size is exactly 8 bytes, as required by AC'97 specs

ac97_busmaster_status_t's size is exactly 2 bytes, as required by AC'97 specs

Global test_validate_ranges ()

validate_double_range() and validate_uint64_range allow values only if they're in the closed interval between minimum and maximum

validate_double_range() and validate_uint64_range still work if minimum=maximum

Global test_volume_macro ()

ac97_mixer_value() handles left and right channel separately

ac97_mixer_value() converts mute value to 1 bit

Global test_wcstof ()
_wcstof() parses a numeric string into a double value
Global test_wctype_float ()

wctype_float() should fail NULL, empty strings and non-numeric strings

wctype_float() should pass positive and negative integers

wctype_float() should pass positive and negative decimal numbers

wctype_float() should fail invalid number-like strings similar to decimals

Global test_wctype_int ()

wctype_int() should fail NULL, empty strings and non-numeric strings

wctype_int() should pass positive and negative integers

wctype_int() should fail decimal numbers