UEFIStarter
a simple UEFI framework
|
Tests for AC'97 functions. More...
#include <Uefi.h>
#include <Library/UefiLib.h>
#include <UEFIStarter/ac97.h>
#include <UEFIStarter/tests/tests.h>
Data Structures | |
struct | volume_macro_testcase_t |
data type for test_volume_macro() test cases More... | |
Macros | |
#define | STRUCT_SIZE_TEST(NAME, SIZE) assert_intn_equals(SIZE,sizeof(NAME),L"sizeof " #NAME); |
Shortcut macro: checks whether symbol has given size. More... | |
Functions | |
void | test_struct_sizes () |
Makes sure AC'97 built-in structures are sized correctly. More... | |
void | test_volume_macro () |
Makes sure ac97_mixer_value() works. More... | |
BOOLEAN | run_ac97_tests () |
Test runner for this group. More... | |
Variables | |
volume_macro_testcase_t | volume_macro_testcases [] |
test cases for test_volume_macro() More... | |
Tests for AC'97 functions.
#define STRUCT_SIZE_TEST | ( | NAME, | |
SIZE | |||
) | assert_intn_equals(SIZE,sizeof(NAME),L"sizeof " #NAME); |
Shortcut macro: checks whether symbol has given size.
NAME | the symbol's name |
SIZE | the expected size, in bytes |
void test_struct_sizes | ( | ) |
Makes sure AC'97 built-in structures are sized correctly.
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
void test_volume_macro | ( | ) |
Makes sure ac97_mixer_value() works.
ac97_mixer_value() handles left and right channel separately
ac97_mixer_value() converts mute value to 1 bit
BOOLEAN run_ac97_tests | ( | ) |
Test runner for this group.
Gets called via the generated test runner.
volume_macro_testcase_t volume_macro_testcases[] |
test cases for test_volume_macro()