diff --git a/lib/libx52/Makefile.am b/lib/libx52/Makefile.am index 50cb4e5..8c9e9ef 100644 --- a/lib/libx52/Makefile.am +++ b/lib/libx52/Makefile.am @@ -33,11 +33,26 @@ pkgconfig_DATA = libx52.pc if HAVE_CMOCKA LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) $(top_srcdir)/tap-driver.sh +TESTS = libx52test +check_PROGRAMS = libx52test + +libx52test_SOURCES = test_libx52.c $(libx52_la_SOURCES) +libx52test_CFLAGS = @LIBUSB_CFLAGS@ -DLOCALEDIR='"$(localedir)"' -I $(top_srcdir) +libx52test_CFLAGS += -DGENERATED_TESTS='"test_libx52.c"' +libx52test_LDFLAGS = -Wl,--wrap=libusb_control_transfer @CMOCKA_LIBS@ @LIBUSB_LIBS@ +libx52test_LDADD = libx52.la + +CLEANFILES = test_libx52.c +test_libx52.c: $(srcdir)/x52_test_gen.py $(srcdir)/x52_tests.json + $(AM_V_GEN) $(PYTHON) $(srcdir)/x52_test_gen.py $(srcdir)/x52_tests.json > $@ endif # Extra files that need to be in the distribution EXTRA_DIST = libx52.h x52_commands.h x52_common.h README.md +# Add test files to the distribution +EXTRA_DIST += x52_test_gen.py x52_tests.json + # Add documentation files to the distribution EXTRA_DIST += \ doc/main.dox \ diff --git a/lib/libx52/x52_test_gen.py b/lib/libx52/x52_test_gen.py new file mode 100755 index 0000000..c64d2d4 --- /dev/null +++ b/lib/libx52/x52_test_gen.py @@ -0,0 +1,242 @@ +#!/usr/bin/env python3 +"""libx52 test generator program, writes test program to stdout""" + +import sys +import json + +_TEST_FILE_HEADER = """/* + * libx52 test program + * + * This file is automatically generated. DO NOT EDIT! + */ + +#include +#include +#include +#include +#include +#include + +#include "x52_common.h" + +static int group_setup(void **state) +{ + libx52_device *dev; + int rc; + + rc = libx52_init(&dev); + if (rc != LIBX52_SUCCESS) { + return rc; + } + + /* Disconnect any potentially connected joysticks */ + (void)libx52_disconnect(dev); + + /* Create a dummy handle so that libx52_update doesn't abort early */ + dev->hdl = (void *)(uintptr_t)(-1); + + *state = dev; + + return 0; +} + +static int group_teardown(void **state) +{ + libx52_device *dev = *state; + + dev->hdl = NULL; + libx52_exit(dev); + return 0; +} + +static int test_setup(void **state) +{ + libx52_device *dev = *state; + void *context = dev->ctx; + void *handle = dev->hdl; + memset(dev, 0, sizeof(*dev)); + dev->ctx = context; + dev->hdl = handle; + /* Set flags to 1 to indicate that we are testing X52 Pro */ + dev->flags = 1; + + return 0; +} + +int __wrap_libusb_control_transfer(libusb_device_handle *dev_handle, + uint8_t request_type, + uint8_t bRequest, + uint16_t wValue, + uint16_t wIndex, + unsigned char *data, + uint16_t wLength, + unsigned int timeout) +{ + function_called(); + check_expected(wIndex); + check_expected(wValue); + assert_int_equal(request_type, + LIBUSB_REQUEST_TYPE_VENDOR | LIBUSB_RECIPIENT_DEVICE | LIBUSB_ENDPOINT_OUT); + assert_int_equal(bRequest, 0x91); + assert_null(data); + assert_int_equal(wLength, 0); + assert_int_equal(timeout, 5000); + + return mock(); +} + +""" + +_TEST_FUNCTION_HEADER = """ +static void {}(void **state) +{{ + libx52_device *dev = *state; + int rc; +""" + +_TEST_FUNCTION_FOOTER_NORMAL = """ + assert_int_equal(rc, LIBX52_SUCCESS); + + rc = libx52_update(dev); + assert_int_equal(rc, LIBX52_SUCCESS); +} +""" + +_TEST_FUNCTION_FOOTER_ERROR = """ + assert_int_equal(rc, LIBX52_ERROR_{}); +}} +""" + +class Test(): + """Test case class, single test""" + + def __init__(self, group, obj): + """Load test case from an object""" + self.function = group.function + self.name = group.name + self.params_prefix = group.params_prefix + self.params = obj["params"] + if len(self.params_prefix) < len(self.params): + self.params_prefix.extend([''] * (len(self.params) - len(self.params_prefix))) + + self.output = obj.get("output", []) + self.retval = obj.get("retval", "") + + def definition(self): + test_name = self.name + '_' + '_'.join(p.strip('"') for p in self.params) + return test_name.lower() + + def print(self): + print(_TEST_FUNCTION_HEADER.format(self.definition())) + + if self.output: + print(" expect_function_calls(__wrap_libusb_control_transfer, {});".format(len(self.output))) + print(" will_return_count(__wrap_libusb_control_transfer, LIBUSB_SUCCESS, {});".format(len(self.output))) + + for idx, val in self.output: + print(" expect_value(__wrap_libusb_control_transfer, wIndex, 0x{});".format(idx)) + print(" expect_value(__wrap_libusb_control_transfer, wValue, 0x{});".format(val)) + + params = ', '.join(''.join(p) for p in zip(self.params_prefix, self.params)) + print(" rc = {}(dev, {});".format(self.function, params)) + + if self.retval: + print(_TEST_FUNCTION_FOOTER_ERROR.format(self.retval)) + else: + print(_TEST_FUNCTION_FOOTER_NORMAL); + +_TEST_GROUP_HEADER = "const struct CMUnitTest tests[] = {" +_TEST_GROUP_FOOTER = """}; + +""" + +class TestGroup(): + """Test group class, contains multiple tests""" + + def __init__(self, name, obj): + """Load test cases from an object""" + self.name = name + self.function = obj["function"] + self.setup_hook = obj.get("setup_hook") + self.params_prefix = obj.get("params_prefix", []) + self.tests = [] + for test in obj["tests"]: + self.tests.append(Test(self, test)) + + def definition(self): + return self.name.lower() + "_tests" + + def print(self): + """Print the test group""" + # Print the test definitions first + for test in self.tests: + test.print() + + # Print the list of test cases + # print(_TEST_GROUP_HEADER.format(self.definition())) + # for test in self.tests: + # print(" cmocka_unit_test_setup({}, test_setup),".format(test.definition())) + # print(_TEST_GROUP_FOOTER) + +_MAIN_HEADER = """ +int main(void) +{ + cmocka_set_message_output(CM_OUTPUT_TAP); + +""" +_MAIN_FOOTER = """ + return 0; +} +""" + +_MAIN = """ +int main(void) +{ + cmocka_set_message_output(CM_OUTPUT_TAP); + cmocka_run_group_tests(tests, group_setup, group_teardown); + return 0; +} +""" + +class TestSuite(): + """Test suite class, contains multiple test cases""" + + def __init__(self, file): + """Load test suite""" + with open(file, 'r') as infile: + self.data = json.load(infile) + self.groups = [] + for group, obj in self.data.items(): + self.groups.append(TestGroup(group, obj)) + + def print(self): + print(_TEST_FILE_HEADER) + + for group in self.groups: + group.print() + + print(_TEST_GROUP_HEADER) + for group in self.groups: + for test in group.tests: + print(" cmocka_unit_test_setup({}, test_setup),".format(test.definition())) + print(_TEST_GROUP_FOOTER) + + print(_MAIN) + # print(_MAIN_HEADER) + # for group in self.groups: + # print(' cmocka_run_group_tests_name("{}", {}, group_setup, group_teardown);'.format( + # group.name, group.definition())) + # print(_MAIN_FOOTER) + + + +def main(): + if len(sys.argv) != 2: + sys.stderr.write('Usage: %s \n' % + sys.argv[0]) + sys.exit(1) + + TestSuite(sys.argv[1]).print() + +if __name__ == "__main__": + main() diff --git a/lib/libx52/x52_tests.json b/lib/libx52/x52_tests.json new file mode 100644 index 0000000..9678f90 --- /dev/null +++ b/lib/libx52/x52_tests.json @@ -0,0 +1,1895 @@ +{ + "LED": { + "function": "libx52_set_led_state", + "params_prefix": ["LIBX52_LED_", "LIBX52_LED_STATE_"], + "tests": [ + { + "params": ["FIRE", "OFF"], + "output": [["00b8", "0100"]] + }, + { + "params": ["FIRE", "ON"], + "output": [["00b8", "0101"]] + }, + { + "params": ["FIRE", "RED"], + "retval": "NOT_SUPPORTED" + }, + { + "params": ["FIRE", "AMBER"], + "retval": "NOT_SUPPORTED" + }, + { + "params": ["FIRE", "GREEN"], + "retval": "NOT_SUPPORTED" + }, + { + "params": ["A", "OFF"], + "output": [["00b8", "0200"], ["00b8", "0300"]] + }, + { + "params": ["A", "ON"], + "retval": "NOT_SUPPORTED" + }, + { + "params": ["A", "RED"], + "output": [["00b8", "0201"], ["00b8", "0300"]] + }, + { + "params": ["A", "AMBER"], + "output": [["00b8", "0201"], ["00b8", "0301"]] + }, + { + "params": ["A", "GREEN"], + "output": [["00b8", "0200"], ["00b8", "0301"]] + }, + { + "params": ["B", "OFF"], + "output": [["00b8", "0400"], ["00b8", "0500"]] + }, + { + "params": ["B", "ON"], + "retval": "NOT_SUPPORTED" + }, + { + "params": ["B", "RED"], + "output": [["00b8", "0401"], ["00b8", "0500"]] + }, + { + "params": ["B", "AMBER"], + "output": [["00b8", "0401"], ["00b8", "0501"]] + }, + { + "params": ["B", "GREEN"], + "output": [["00b8", "0400"], ["00b8", "0501"]] + }, + { + "params": ["D", "OFF"], + "output": [["00b8", "0600"], ["00b8", "0700"]] + }, + { + "params": ["D", "ON"], + "retval": "NOT_SUPPORTED" + }, + { + "params": ["D", "RED"], + "output": [["00b8", "0601"], ["00b8", "0700"]] + }, + { + "params": ["D", "AMBER"], + "output": [["00b8", "0601"], ["00b8", "0701"]] + }, + { + "params": ["D", "GREEN"], + "output": [["00b8", "0600"], ["00b8", "0701"]] + }, + { + "params": ["E", "OFF"], + "output": [["00b8", "0800"], ["00b8", "0900"]] + }, + { + "params": ["E", "ON"], + "retval": "NOT_SUPPORTED" + }, + { + "params": ["E", "RED"], + "output": [["00b8", "0801"], ["00b8", "0900"]] + }, + { + "params": ["E", "AMBER"], + "output": [["00b8", "0801"], ["00b8", "0901"]] + }, + { + "params": ["E", "GREEN"], + "output": [["00b8", "0800"], ["00b8", "0901"]] + }, + { + "params": ["T1", "OFF"], + "output": [["00b8", "0a00"], ["00b8", "0b00"]] + }, + { + "params": ["T1", "ON"], + "retval": "NOT_SUPPORTED" + }, + { + "params": ["T1", "RED"], + "output": [["00b8", "0a01"], ["00b8", "0b00"]] + }, + { + "params": ["T1", "AMBER"], + "output": [["00b8", "0a01"], ["00b8", "0b01"]] + }, + { + "params": ["T1", "GREEN"], + "output": [["00b8", "0a00"], ["00b8", "0b01"]] + }, + { + "params": ["T2", "OFF"], + "output": [["00b8", "0c00"], ["00b8", "0d00"]] + }, + { + "params": ["T2", "ON"], + "retval": "NOT_SUPPORTED" + }, + { + "params": ["T2", "RED"], + "output": [["00b8", "0c01"], ["00b8", "0d00"]] + }, + { + "params": ["T2", "AMBER"], + "output": [["00b8", "0c01"], ["00b8", "0d01"]] + }, + { + "params": ["T2", "GREEN"], + "output": [["00b8", "0c00"], ["00b8", "0d01"]] + }, + { + "params": ["T3", "OFF"], + "output": [["00b8", "0e00"], ["00b8", "0f00"]] + }, + { + "params": ["T3", "ON"], + "retval": "NOT_SUPPORTED" + }, + { + "params": ["T3", "RED"], + "output": [["00b8", "0e01"], ["00b8", "0f00"]] + }, + { + "params": ["T3", "AMBER"], + "output": [["00b8", "0e01"], ["00b8", "0f01"]] + }, + { + "params": ["T3", "GREEN"], + "output": [["00b8", "0e00"], ["00b8", "0f01"]] + }, + { + "params": ["POV", "OFF"], + "output": [["00b8", "1000"], ["00b8", "1100"]] + }, + { + "params": ["POV", "ON"], + "retval": "NOT_SUPPORTED" + }, + { + "params": ["POV", "RED"], + "output": [["00b8", "1001"], ["00b8", "1100"]] + }, + { + "params": ["POV", "AMBER"], + "output": [["00b8", "1001"], ["00b8", "1101"]] + }, + { + "params": ["POV", "GREEN"], + "output": [["00b8", "1000"], ["00b8", "1101"]] + }, + { + "params": ["CLUTCH", "OFF"], + "output": [["00b8", "1200"], ["00b8", "1300"]] + }, + { + "params": ["CLUTCH", "ON"], + "retval": "NOT_SUPPORTED" + }, + { + "params": ["CLUTCH", "RED"], + "output": [["00b8", "1201"], ["00b8", "1300"]] + }, + { + "params": ["CLUTCH", "AMBER"], + "output": [["00b8", "1201"], ["00b8", "1301"]] + }, + { + "params": ["CLUTCH", "GREEN"], + "output": [["00b8", "1200"], ["00b8", "1301"]] + }, + { + "params": ["THROTTLE", "OFF"], + "output": [["00b8", "1400"]] + }, + { + "params": ["THROTTLE", "ON"], + "output": [["00b8", "1401"]] + }, + { + "params": ["THROTTLE", "RED"], + "retval": "NOT_SUPPORTED" + }, + { + "params": ["THROTTLE", "AMBER"], + "retval": "NOT_SUPPORTED" + }, + { + "params": ["THROTTLE", "GREEN"], + "retval": "NOT_SUPPORTED" + } + ] + }, + "MFD": { + "function": "libx52_set_text", + "tests": [ + { + "params": ["0", "\"\"", "0"], + "output": [ + ["00d9", "0000"] + ] + }, + { + "params": ["0", "\"a\"", "1"], + "output": [ + ["00d9", "0000"], + ["00d1", "2061"] + ] + }, + { + "params": ["0", "\"ab\"", "2"], + "output": [ + ["00d9", "0000"], + ["00d1", "6261"] + ] + }, + { + "params": ["0", "\"abc\"", "3"], + "output": [ + ["00d9", "0000"], + ["00d1", "6261"], + ["00d1", "2063"] + ] + }, + { + "params": ["0", "\"abcd\"", "4"], + "output": [ + ["00d9", "0000"], + ["00d1", "6261"], + ["00d1", "6463"] + ] + }, + { + "params": ["0", "\"abcde\"", "5"], + "output": [ + ["00d9", "0000"], + ["00d1", "6261"], + ["00d1", "6463"], + ["00d1", "2065"] + ] + }, + { + "params": ["0", "\"abcdef\"", "6"], + "output": [ + ["00d9", "0000"], + ["00d1", "6261"], + ["00d1", "6463"], + ["00d1", "6665"] + ] + }, + { + "params": ["0", "\"abcdefg\"", "7"], + "output": [ + ["00d9", "0000"], + ["00d1", "6261"], + ["00d1", "6463"], + ["00d1", "6665"], + ["00d1", "2067"] + ] + }, + { + "params": ["0", "\"abcdefgh\"", "8"], + "output": [ + ["00d9", "0000"], + ["00d1", "6261"], + ["00d1", "6463"], + ["00d1", "6665"], + ["00d1", "6867"] + ] + }, + { + "params": ["0", "\"abcdefghi\"", "9"], + "output": [ + ["00d9", "0000"], + ["00d1", "6261"], + ["00d1", "6463"], + ["00d1", "6665"], + ["00d1", "6867"], + ["00d1", "2069"] + ] + }, + { + "params": ["0", "\"abcdefghij\"", "10"], + "output": [ + ["00d9", "0000"], + ["00d1", "6261"], + ["00d1", "6463"], + ["00d1", "6665"], + ["00d1", "6867"], + ["00d1", "6a69"] + ] + }, + { + "params": ["0", "\"abcdefghijk\"", "11"], + "output": [ + ["00d9", "0000"], + ["00d1", "6261"], + ["00d1", "6463"], + ["00d1", "6665"], + ["00d1", "6867"], + ["00d1", "6a69"], + ["00d1", "206b"] + ] + }, + { + "params": ["0", "\"abcdefghijkl\"", "12"], + "output": [ + ["00d9", "0000"], + ["00d1", "6261"], + ["00d1", "6463"], + ["00d1", "6665"], + ["00d1", "6867"], + ["00d1", "6a69"], + ["00d1", "6c6b"] + ] + }, + { + "params": ["0", "\"abcdefghijklm\"", "13"], + "output": [ + ["00d9", "0000"], + ["00d1", "6261"], + ["00d1", "6463"], + ["00d1", "6665"], + ["00d1", "6867"], + ["00d1", "6a69"], + ["00d1", "6c6b"], + ["00d1", "206d"] + ] + }, + { + "params": ["0", "\"abcdefghijklmn\"", "14"], + "output": [ + ["00d9", "0000"], + ["00d1", "6261"], + ["00d1", "6463"], + ["00d1", "6665"], + ["00d1", "6867"], + ["00d1", "6a69"], + ["00d1", "6c6b"], + ["00d1", "6e6d"] + ] + }, + { + "params": ["0", "\"abcdefghijklmno\"", "15"], + "output": [ + ["00d9", "0000"], + ["00d1", "6261"], + ["00d1", "6463"], + ["00d1", "6665"], + ["00d1", "6867"], + ["00d1", "6a69"], + ["00d1", "6c6b"], + ["00d1", "6e6d"], + ["00d1", "206f"] + ] + }, + { + "params": ["0", "\"abcdefghijklmnop\"", "16"], + "output": [ + ["00d9", "0000"], + ["00d1", "6261"], + ["00d1", "6463"], + ["00d1", "6665"], + ["00d1", "6867"], + ["00d1", "6a69"], + ["00d1", "6c6b"], + ["00d1", "6e6d"], + ["00d1", "706f"] + ] + }, + { + "params": ["0", "\"abcdefghijklmnopq\"", "17"], + "output": [ + ["00d9", "0000"], + ["00d1", "6261"], + ["00d1", "6463"], + ["00d1", "6665"], + ["00d1", "6867"], + ["00d1", "6a69"], + ["00d1", "6c6b"], + ["00d1", "6e6d"], + ["00d1", "706f"] + ] + }, + { + "params": ["0", "\"abcdefghijklmnopqr\"", "18"], + "output": [ + ["00d9", "0000"], + ["00d1", "6261"], + ["00d1", "6463"], + ["00d1", "6665"], + ["00d1", "6867"], + ["00d1", "6a69"], + ["00d1", "6c6b"], + ["00d1", "6e6d"], + ["00d1", "706f"] + ] + }, + { + "params": ["1", "\"\"", "0"], + "output": [ + ["00da", "0000"] + ] + }, + { + "params": ["1", "\"a\"", "1"], + "output": [ + ["00da", "0000"], + ["00d2", "2061"] + ] + }, + { + "params": ["1", "\"ab\"", "2"], + "output": [ + ["00da", "0000"], + ["00d2", "6261"] + ] + }, + { + "params": ["1", "\"abc\"", "3"], + "output": [ + ["00da", "0000"], + ["00d2", "6261"], + ["00d2", "2063"] + ] + }, + { + "params": ["1", "\"abcd\"", "4"], + "output": [ + ["00da", "0000"], + ["00d2", "6261"], + ["00d2", "6463"] + ] + }, + { + "params": ["1", "\"abcde\"", "5"], + "output": [ + ["00da", "0000"], + ["00d2", "6261"], + ["00d2", "6463"], + ["00d2", "2065"] + ] + }, + { + "params": ["1", "\"abcdef\"", "6"], + "output": [ + ["00da", "0000"], + ["00d2", "6261"], + ["00d2", "6463"], + ["00d2", "6665"] + ] + }, + { + "params": ["1", "\"abcdefg\"", "7"], + "output": [ + ["00da", "0000"], + ["00d2", "6261"], + ["00d2", "6463"], + ["00d2", "6665"], + ["00d2", "2067"] + ] + }, + { + "params": ["1", "\"abcdefgh\"", "8"], + "output": [ + ["00da", "0000"], + ["00d2", "6261"], + ["00d2", "6463"], + ["00d2", "6665"], + ["00d2", "6867"] + ] + }, + { + "params": ["1", "\"abcdefghi\"", "9"], + "output": [ + ["00da", "0000"], + ["00d2", "6261"], + ["00d2", "6463"], + ["00d2", "6665"], + ["00d2", "6867"], + ["00d2", "2069"] + ] + }, + { + "params": ["1", "\"abcdefghij\"", "10"], + "output": [ + ["00da", "0000"], + ["00d2", "6261"], + ["00d2", "6463"], + ["00d2", "6665"], + ["00d2", "6867"], + ["00d2", "6a69"] + ] + }, + { + "params": ["1", "\"abcdefghijk\"", "11"], + "output": [ + ["00da", "0000"], + ["00d2", "6261"], + ["00d2", "6463"], + ["00d2", "6665"], + ["00d2", "6867"], + ["00d2", "6a69"], + ["00d2", "206b"] + ] + }, + { + "params": ["1", "\"abcdefghijkl\"", "12"], + "output": [ + ["00da", "0000"], + ["00d2", "6261"], + ["00d2", "6463"], + ["00d2", "6665"], + ["00d2", "6867"], + ["00d2", "6a69"], + ["00d2", "6c6b"] + ] + }, + { + "params": ["1", "\"abcdefghijklm\"", "13"], + "output": [ + ["00da", "0000"], + ["00d2", "6261"], + ["00d2", "6463"], + ["00d2", "6665"], + ["00d2", "6867"], + ["00d2", "6a69"], + ["00d2", "6c6b"], + ["00d2", "206d"] + ] + }, + { + "params": ["1", "\"abcdefghijklmn\"", "14"], + "output": [ + ["00da", "0000"], + ["00d2", "6261"], + ["00d2", "6463"], + ["00d2", "6665"], + ["00d2", "6867"], + ["00d2", "6a69"], + ["00d2", "6c6b"], + ["00d2", "6e6d"] + ] + }, + { + "params": ["1", "\"abcdefghijklmno\"", "15"], + "output": [ + ["00da", "0000"], + ["00d2", "6261"], + ["00d2", "6463"], + ["00d2", "6665"], + ["00d2", "6867"], + ["00d2", "6a69"], + ["00d2", "6c6b"], + ["00d2", "6e6d"], + ["00d2", "206f"] + ] + }, + { + "params": ["1", "\"abcdefghijklmnop\"", "16"], + "output": [ + ["00da", "0000"], + ["00d2", "6261"], + ["00d2", "6463"], + ["00d2", "6665"], + ["00d2", "6867"], + ["00d2", "6a69"], + ["00d2", "6c6b"], + ["00d2", "6e6d"], + ["00d2", "706f"] + ] + }, + { + "params": ["1", "\"abcdefghijklmnopq\"", "17"], + "output": [ + ["00da", "0000"], + ["00d2", "6261"], + ["00d2", "6463"], + ["00d2", "6665"], + ["00d2", "6867"], + ["00d2", "6a69"], + ["00d2", "6c6b"], + ["00d2", "6e6d"], + ["00d2", "706f"] + ] + }, + { + "params": ["1", "\"abcdefghijklmnopqr\"", "18"], + "output": [ + ["00da", "0000"], + ["00d2", "6261"], + ["00d2", "6463"], + ["00d2", "6665"], + ["00d2", "6867"], + ["00d2", "6a69"], + ["00d2", "6c6b"], + ["00d2", "6e6d"], + ["00d2", "706f"] + ] + }, + { + "params": ["2", "\"\"", "0"], + "output": [ + ["00dc", "0000"] + ] + }, + { + "params": ["2", "\"a\"", "1"], + "output": [ + ["00dc", "0000"], + ["00d4", "2061"] + ] + }, + { + "params": ["2", "\"ab\"", "2"], + "output": [ + ["00dc", "0000"], + ["00d4", "6261"] + ] + }, + { + "params": ["2", "\"abc\"", "3"], + "output": [ + ["00dc", "0000"], + ["00d4", "6261"], + ["00d4", "2063"] + ] + }, + { + "params": ["2", "\"abcd\"", "4"], + "output": [ + ["00dc", "0000"], + ["00d4", "6261"], + ["00d4", "6463"] + ] + }, + { + "params": ["2", "\"abcde\"", "5"], + "output": [ + ["00dc", "0000"], + ["00d4", "6261"], + ["00d4", "6463"], + ["00d4", "2065"] + ] + }, + { + "params": ["2", "\"abcdef\"", "6"], + "output": [ + ["00dc", "0000"], + ["00d4", "6261"], + ["00d4", "6463"], + ["00d4", "6665"] + ] + }, + { + "params": ["2", "\"abcdefg\"", "7"], + "output": [ + ["00dc", "0000"], + ["00d4", "6261"], + ["00d4", "6463"], + ["00d4", "6665"], + ["00d4", "2067"] + ] + }, + { + "params": ["2", "\"abcdefgh\"", "8"], + "output": [ + ["00dc", "0000"], + ["00d4", "6261"], + ["00d4", "6463"], + ["00d4", "6665"], + ["00d4", "6867"] + ] + }, + { + "params": ["2", "\"abcdefghi\"", "9"], + "output": [ + ["00dc", "0000"], + ["00d4", "6261"], + ["00d4", "6463"], + ["00d4", "6665"], + ["00d4", "6867"], + ["00d4", "2069"] + ] + }, + { + "params": ["2", "\"abcdefghij\"", "10"], + "output": [ + ["00dc", "0000"], + ["00d4", "6261"], + ["00d4", "6463"], + ["00d4", "6665"], + ["00d4", "6867"], + ["00d4", "6a69"] + ] + }, + { + "params": ["2", "\"abcdefghijk\"", "11"], + "output": [ + ["00dc", "0000"], + ["00d4", "6261"], + ["00d4", "6463"], + ["00d4", "6665"], + ["00d4", "6867"], + ["00d4", "6a69"], + ["00d4", "206b"] + ] + }, + { + "params": ["2", "\"abcdefghijkl\"", "12"], + "output": [ + ["00dc", "0000"], + ["00d4", "6261"], + ["00d4", "6463"], + ["00d4", "6665"], + ["00d4", "6867"], + ["00d4", "6a69"], + ["00d4", "6c6b"] + ] + }, + { + "params": ["2", "\"abcdefghijklm\"", "13"], + "output": [ + ["00dc", "0000"], + ["00d4", "6261"], + ["00d4", "6463"], + ["00d4", "6665"], + ["00d4", "6867"], + ["00d4", "6a69"], + ["00d4", "6c6b"], + ["00d4", "206d"] + ] + }, + { + "params": ["2", "\"abcdefghijklmn\"", "14"], + "output": [ + ["00dc", "0000"], + ["00d4", "6261"], + ["00d4", "6463"], + ["00d4", "6665"], + ["00d4", "6867"], + ["00d4", "6a69"], + ["00d4", "6c6b"], + ["00d4", "6e6d"] + ] + }, + { + "params": ["2", "\"abcdefghijklmno\"", "15"], + "output": [ + ["00dc", "0000"], + ["00d4", "6261"], + ["00d4", "6463"], + ["00d4", "6665"], + ["00d4", "6867"], + ["00d4", "6a69"], + ["00d4", "6c6b"], + ["00d4", "6e6d"], + ["00d4", "206f"] + ] + }, + { + "params": ["2", "\"abcdefghijklmnop\"", "16"], + "output": [ + ["00dc", "0000"], + ["00d4", "6261"], + ["00d4", "6463"], + ["00d4", "6665"], + ["00d4", "6867"], + ["00d4", "6a69"], + ["00d4", "6c6b"], + ["00d4", "6e6d"], + ["00d4", "706f"] + ] + }, + { + "params": ["2", "\"abcdefghijklmnopq\"", "17"], + "output": [ + ["00dc", "0000"], + ["00d4", "6261"], + ["00d4", "6463"], + ["00d4", "6665"], + ["00d4", "6867"], + ["00d4", "6a69"], + ["00d4", "6c6b"], + ["00d4", "6e6d"], + ["00d4", "706f"] + ] + }, + { + "params": ["2", "\"abcdefghijklmnopqr\"", "18"], + "output": [ + ["00dc", "0000"], + ["00d4", "6261"], + ["00d4", "6463"], + ["00d4", "6665"], + ["00d4", "6867"], + ["00d4", "6a69"], + ["00d4", "6c6b"], + ["00d4", "6e6d"], + ["00d4", "706f"] + ] + }, + { + "params": ["3", "\"\"", "0"], + "retval": "INVALID_PARAM" + } + ] + }, + "Brightness": { + "function": "libx52_set_brightness", + "tests": [ + { + "params": ["0", "0"], + "output": [["00b2", "0000"]] + }, + { + "params": ["0", "1"], + "output": [["00b2", "0001"]] + }, + { + "params": ["0", "2"], + "output": [["00b2", "0002"]] + }, + { + "params": ["0", "3"], + "output": [["00b2", "0003"]] + }, + { + "params": ["0", "4"], + "output": [["00b2", "0004"]] + }, + { + "params": ["0", "5"], + "output": [["00b2", "0005"]] + }, + { + "params": ["0", "6"], + "output": [["00b2", "0006"]] + }, + { + "params": ["0", "7"], + "output": [["00b2", "0007"]] + }, + { + "params": ["0", "8"], + "output": [["00b2", "0008"]] + }, + { + "params": ["0", "9"], + "output": [["00b2", "0009"]] + }, + { + "params": ["0", "10"], + "output": [["00b2", "000a"]] + }, + { + "params": ["0", "11"], + "output": [["00b2", "000b"]] + }, + { + "params": ["0", "12"], + "output": [["00b2", "000c"]] + }, + { + "params": ["0", "13"], + "output": [["00b2", "000d"]] + }, + { + "params": ["0", "14"], + "output": [["00b2", "000e"]] + }, + { + "params": ["0", "15"], + "output": [["00b2", "000f"]] + }, + { + "params": ["0", "16"], + "output": [["00b2", "0010"]] + }, + { + "params": ["0", "17"], + "output": [["00b2", "0011"]] + }, + { + "params": ["0", "18"], + "output": [["00b2", "0012"]] + }, + { + "params": ["0", "19"], + "output": [["00b2", "0013"]] + }, + { + "params": ["0", "20"], + "output": [["00b2", "0014"]] + }, + { + "params": ["0", "21"], + "output": [["00b2", "0015"]] + }, + { + "params": ["0", "22"], + "output": [["00b2", "0016"]] + }, + { + "params": ["0", "23"], + "output": [["00b2", "0017"]] + }, + { + "params": ["0", "24"], + "output": [["00b2", "0018"]] + }, + { + "params": ["0", "25"], + "output": [["00b2", "0019"]] + }, + { + "params": ["0", "26"], + "output": [["00b2", "001a"]] + }, + { + "params": ["0", "27"], + "output": [["00b2", "001b"]] + }, + { + "params": ["0", "28"], + "output": [["00b2", "001c"]] + }, + { + "params": ["0", "29"], + "output": [["00b2", "001d"]] + }, + { + "params": ["0", "30"], + "output": [["00b2", "001e"]] + }, + { + "params": ["0", "31"], + "output": [["00b2", "001f"]] + }, + { + "params": ["0", "32"], + "output": [["00b2", "0020"]] + }, + { + "params": ["0", "33"], + "output": [["00b2", "0021"]] + }, + { + "params": ["0", "34"], + "output": [["00b2", "0022"]] + }, + { + "params": ["0", "35"], + "output": [["00b2", "0023"]] + }, + { + "params": ["0", "36"], + "output": [["00b2", "0024"]] + }, + { + "params": ["0", "37"], + "output": [["00b2", "0025"]] + }, + { + "params": ["0", "38"], + "output": [["00b2", "0026"]] + }, + { + "params": ["0", "39"], + "output": [["00b2", "0027"]] + }, + { + "params": ["0", "40"], + "output": [["00b2", "0028"]] + }, + { + "params": ["0", "41"], + "output": [["00b2", "0029"]] + }, + { + "params": ["0", "42"], + "output": [["00b2", "002a"]] + }, + { + "params": ["0", "43"], + "output": [["00b2", "002b"]] + }, + { + "params": ["0", "44"], + "output": [["00b2", "002c"]] + }, + { + "params": ["0", "45"], + "output": [["00b2", "002d"]] + }, + { + "params": ["0", "46"], + "output": [["00b2", "002e"]] + }, + { + "params": ["0", "47"], + "output": [["00b2", "002f"]] + }, + { + "params": ["0", "48"], + "output": [["00b2", "0030"]] + }, + { + "params": ["0", "49"], + "output": [["00b2", "0031"]] + }, + { + "params": ["0", "50"], + "output": [["00b2", "0032"]] + }, + { + "params": ["0", "51"], + "output": [["00b2", "0033"]] + }, + { + "params": ["0", "52"], + "output": [["00b2", "0034"]] + }, + { + "params": ["0", "53"], + "output": [["00b2", "0035"]] + }, + { + "params": ["0", "54"], + "output": [["00b2", "0036"]] + }, + { + "params": ["0", "55"], + "output": [["00b2", "0037"]] + }, + { + "params": ["0", "56"], + "output": [["00b2", "0038"]] + }, + { + "params": ["0", "57"], + "output": [["00b2", "0039"]] + }, + { + "params": ["0", "58"], + "output": [["00b2", "003a"]] + }, + { + "params": ["0", "59"], + "output": [["00b2", "003b"]] + }, + { + "params": ["0", "60"], + "output": [["00b2", "003c"]] + }, + { + "params": ["0", "61"], + "output": [["00b2", "003d"]] + }, + { + "params": ["0", "62"], + "output": [["00b2", "003e"]] + }, + { + "params": ["0", "63"], + "output": [["00b2", "003f"]] + }, + { + "params": ["0", "64"], + "output": [["00b2", "0040"]] + }, + { + "params": ["0", "65"], + "output": [["00b2", "0041"]] + }, + { + "params": ["0", "66"], + "output": [["00b2", "0042"]] + }, + { + "params": ["0", "67"], + "output": [["00b2", "0043"]] + }, + { + "params": ["0", "68"], + "output": [["00b2", "0044"]] + }, + { + "params": ["0", "69"], + "output": [["00b2", "0045"]] + }, + { + "params": ["0", "70"], + "output": [["00b2", "0046"]] + }, + { + "params": ["0", "71"], + "output": [["00b2", "0047"]] + }, + { + "params": ["0", "72"], + "output": [["00b2", "0048"]] + }, + { + "params": ["0", "73"], + "output": [["00b2", "0049"]] + }, + { + "params": ["0", "74"], + "output": [["00b2", "004a"]] + }, + { + "params": ["0", "75"], + "output": [["00b2", "004b"]] + }, + { + "params": ["0", "76"], + "output": [["00b2", "004c"]] + }, + { + "params": ["0", "77"], + "output": [["00b2", "004d"]] + }, + { + "params": ["0", "78"], + "output": [["00b2", "004e"]] + }, + { + "params": ["0", "79"], + "output": [["00b2", "004f"]] + }, + { + "params": ["0", "80"], + "output": [["00b2", "0050"]] + }, + { + "params": ["0", "81"], + "output": [["00b2", "0051"]] + }, + { + "params": ["0", "82"], + "output": [["00b2", "0052"]] + }, + { + "params": ["0", "83"], + "output": [["00b2", "0053"]] + }, + { + "params": ["0", "84"], + "output": [["00b2", "0054"]] + }, + { + "params": ["0", "85"], + "output": [["00b2", "0055"]] + }, + { + "params": ["0", "86"], + "output": [["00b2", "0056"]] + }, + { + "params": ["0", "87"], + "output": [["00b2", "0057"]] + }, + { + "params": ["0", "88"], + "output": [["00b2", "0058"]] + }, + { + "params": ["0", "89"], + "output": [["00b2", "0059"]] + }, + { + "params": ["0", "90"], + "output": [["00b2", "005a"]] + }, + { + "params": ["0", "91"], + "output": [["00b2", "005b"]] + }, + { + "params": ["0", "92"], + "output": [["00b2", "005c"]] + }, + { + "params": ["0", "93"], + "output": [["00b2", "005d"]] + }, + { + "params": ["0", "94"], + "output": [["00b2", "005e"]] + }, + { + "params": ["0", "95"], + "output": [["00b2", "005f"]] + }, + { + "params": ["0", "96"], + "output": [["00b2", "0060"]] + }, + { + "params": ["0", "97"], + "output": [["00b2", "0061"]] + }, + { + "params": ["0", "98"], + "output": [["00b2", "0062"]] + }, + { + "params": ["0", "99"], + "output": [["00b2", "0063"]] + }, + { + "params": ["0", "100"], + "output": [["00b2", "0064"]] + }, + { + "params": ["0", "101"], + "output": [["00b2", "0065"]] + }, + { + "params": ["0", "102"], + "output": [["00b2", "0066"]] + }, + { + "params": ["0", "103"], + "output": [["00b2", "0067"]] + }, + { + "params": ["0", "104"], + "output": [["00b2", "0068"]] + }, + { + "params": ["0", "105"], + "output": [["00b2", "0069"]] + }, + { + "params": ["0", "106"], + "output": [["00b2", "006a"]] + }, + { + "params": ["0", "107"], + "output": [["00b2", "006b"]] + }, + { + "params": ["0", "108"], + "output": [["00b2", "006c"]] + }, + { + "params": ["0", "109"], + "output": [["00b2", "006d"]] + }, + { + "params": ["0", "110"], + "output": [["00b2", "006e"]] + }, + { + "params": ["0", "111"], + "output": [["00b2", "006f"]] + }, + { + "params": ["0", "112"], + "output": [["00b2", "0070"]] + }, + { + "params": ["0", "113"], + "output": [["00b2", "0071"]] + }, + { + "params": ["0", "114"], + "output": [["00b2", "0072"]] + }, + { + "params": ["0", "115"], + "output": [["00b2", "0073"]] + }, + { + "params": ["0", "116"], + "output": [["00b2", "0074"]] + }, + { + "params": ["0", "117"], + "output": [["00b2", "0075"]] + }, + { + "params": ["0", "118"], + "output": [["00b2", "0076"]] + }, + { + "params": ["0", "119"], + "output": [["00b2", "0077"]] + }, + { + "params": ["0", "120"], + "output": [["00b2", "0078"]] + }, + { + "params": ["0", "121"], + "output": [["00b2", "0079"]] + }, + { + "params": ["0", "122"], + "output": [["00b2", "007a"]] + }, + { + "params": ["0", "123"], + "output": [["00b2", "007b"]] + }, + { + "params": ["0", "124"], + "output": [["00b2", "007c"]] + }, + { + "params": ["0", "125"], + "output": [["00b2", "007d"]] + }, + { + "params": ["0", "126"], + "output": [["00b2", "007e"]] + }, + { + "params": ["0", "127"], + "output": [["00b2", "007f"]] + }, + { + "params": ["0", "128"], + "output": [["00b2", "0080"]] + }, + { + "params": ["1", "0"], + "output": [["00b1", "0000"]] + }, + { + "params": ["1", "1"], + "output": [["00b1", "0001"]] + }, + { + "params": ["1", "2"], + "output": [["00b1", "0002"]] + }, + { + "params": ["1", "3"], + "output": [["00b1", "0003"]] + }, + { + "params": ["1", "4"], + "output": [["00b1", "0004"]] + }, + { + "params": ["1", "5"], + "output": [["00b1", "0005"]] + }, + { + "params": ["1", "6"], + "output": [["00b1", "0006"]] + }, + { + "params": ["1", "7"], + "output": [["00b1", "0007"]] + }, + { + "params": ["1", "8"], + "output": [["00b1", "0008"]] + }, + { + "params": ["1", "9"], + "output": [["00b1", "0009"]] + }, + { + "params": ["1", "10"], + "output": [["00b1", "000a"]] + }, + { + "params": ["1", "11"], + "output": [["00b1", "000b"]] + }, + { + "params": ["1", "12"], + "output": [["00b1", "000c"]] + }, + { + "params": ["1", "13"], + "output": [["00b1", "000d"]] + }, + { + "params": ["1", "14"], + "output": [["00b1", "000e"]] + }, + { + "params": ["1", "15"], + "output": [["00b1", "000f"]] + }, + { + "params": ["1", "16"], + "output": [["00b1", "0010"]] + }, + { + "params": ["1", "17"], + "output": [["00b1", "0011"]] + }, + { + "params": ["1", "18"], + "output": [["00b1", "0012"]] + }, + { + "params": ["1", "19"], + "output": [["00b1", "0013"]] + }, + { + "params": ["1", "20"], + "output": [["00b1", "0014"]] + }, + { + "params": ["1", "21"], + "output": [["00b1", "0015"]] + }, + { + "params": ["1", "22"], + "output": [["00b1", "0016"]] + }, + { + "params": ["1", "23"], + "output": [["00b1", "0017"]] + }, + { + "params": ["1", "24"], + "output": [["00b1", "0018"]] + }, + { + "params": ["1", "25"], + "output": [["00b1", "0019"]] + }, + { + "params": ["1", "26"], + "output": [["00b1", "001a"]] + }, + { + "params": ["1", "27"], + "output": [["00b1", "001b"]] + }, + { + "params": ["1", "28"], + "output": [["00b1", "001c"]] + }, + { + "params": ["1", "29"], + "output": [["00b1", "001d"]] + }, + { + "params": ["1", "30"], + "output": [["00b1", "001e"]] + }, + { + "params": ["1", "31"], + "output": [["00b1", "001f"]] + }, + { + "params": ["1", "32"], + "output": [["00b1", "0020"]] + }, + { + "params": ["1", "33"], + "output": [["00b1", "0021"]] + }, + { + "params": ["1", "34"], + "output": [["00b1", "0022"]] + }, + { + "params": ["1", "35"], + "output": [["00b1", "0023"]] + }, + { + "params": ["1", "36"], + "output": [["00b1", "0024"]] + }, + { + "params": ["1", "37"], + "output": [["00b1", "0025"]] + }, + { + "params": ["1", "38"], + "output": [["00b1", "0026"]] + }, + { + "params": ["1", "39"], + "output": [["00b1", "0027"]] + }, + { + "params": ["1", "40"], + "output": [["00b1", "0028"]] + }, + { + "params": ["1", "41"], + "output": [["00b1", "0029"]] + }, + { + "params": ["1", "42"], + "output": [["00b1", "002a"]] + }, + { + "params": ["1", "43"], + "output": [["00b1", "002b"]] + }, + { + "params": ["1", "44"], + "output": [["00b1", "002c"]] + }, + { + "params": ["1", "45"], + "output": [["00b1", "002d"]] + }, + { + "params": ["1", "46"], + "output": [["00b1", "002e"]] + }, + { + "params": ["1", "47"], + "output": [["00b1", "002f"]] + }, + { + "params": ["1", "48"], + "output": [["00b1", "0030"]] + }, + { + "params": ["1", "49"], + "output": [["00b1", "0031"]] + }, + { + "params": ["1", "50"], + "output": [["00b1", "0032"]] + }, + { + "params": ["1", "51"], + "output": [["00b1", "0033"]] + }, + { + "params": ["1", "52"], + "output": [["00b1", "0034"]] + }, + { + "params": ["1", "53"], + "output": [["00b1", "0035"]] + }, + { + "params": ["1", "54"], + "output": [["00b1", "0036"]] + }, + { + "params": ["1", "55"], + "output": [["00b1", "0037"]] + }, + { + "params": ["1", "56"], + "output": [["00b1", "0038"]] + }, + { + "params": ["1", "57"], + "output": [["00b1", "0039"]] + }, + { + "params": ["1", "58"], + "output": [["00b1", "003a"]] + }, + { + "params": ["1", "59"], + "output": [["00b1", "003b"]] + }, + { + "params": ["1", "60"], + "output": [["00b1", "003c"]] + }, + { + "params": ["1", "61"], + "output": [["00b1", "003d"]] + }, + { + "params": ["1", "62"], + "output": [["00b1", "003e"]] + }, + { + "params": ["1", "63"], + "output": [["00b1", "003f"]] + }, + { + "params": ["1", "64"], + "output": [["00b1", "0040"]] + }, + { + "params": ["1", "65"], + "output": [["00b1", "0041"]] + }, + { + "params": ["1", "66"], + "output": [["00b1", "0042"]] + }, + { + "params": ["1", "67"], + "output": [["00b1", "0043"]] + }, + { + "params": ["1", "68"], + "output": [["00b1", "0044"]] + }, + { + "params": ["1", "69"], + "output": [["00b1", "0045"]] + }, + { + "params": ["1", "70"], + "output": [["00b1", "0046"]] + }, + { + "params": ["1", "71"], + "output": [["00b1", "0047"]] + }, + { + "params": ["1", "72"], + "output": [["00b1", "0048"]] + }, + { + "params": ["1", "73"], + "output": [["00b1", "0049"]] + }, + { + "params": ["1", "74"], + "output": [["00b1", "004a"]] + }, + { + "params": ["1", "75"], + "output": [["00b1", "004b"]] + }, + { + "params": ["1", "76"], + "output": [["00b1", "004c"]] + }, + { + "params": ["1", "77"], + "output": [["00b1", "004d"]] + }, + { + "params": ["1", "78"], + "output": [["00b1", "004e"]] + }, + { + "params": ["1", "79"], + "output": [["00b1", "004f"]] + }, + { + "params": ["1", "80"], + "output": [["00b1", "0050"]] + }, + { + "params": ["1", "81"], + "output": [["00b1", "0051"]] + }, + { + "params": ["1", "82"], + "output": [["00b1", "0052"]] + }, + { + "params": ["1", "83"], + "output": [["00b1", "0053"]] + }, + { + "params": ["1", "84"], + "output": [["00b1", "0054"]] + }, + { + "params": ["1", "85"], + "output": [["00b1", "0055"]] + }, + { + "params": ["1", "86"], + "output": [["00b1", "0056"]] + }, + { + "params": ["1", "87"], + "output": [["00b1", "0057"]] + }, + { + "params": ["1", "88"], + "output": [["00b1", "0058"]] + }, + { + "params": ["1", "89"], + "output": [["00b1", "0059"]] + }, + { + "params": ["1", "90"], + "output": [["00b1", "005a"]] + }, + { + "params": ["1", "91"], + "output": [["00b1", "005b"]] + }, + { + "params": ["1", "92"], + "output": [["00b1", "005c"]] + }, + { + "params": ["1", "93"], + "output": [["00b1", "005d"]] + }, + { + "params": ["1", "94"], + "output": [["00b1", "005e"]] + }, + { + "params": ["1", "95"], + "output": [["00b1", "005f"]] + }, + { + "params": ["1", "96"], + "output": [["00b1", "0060"]] + }, + { + "params": ["1", "97"], + "output": [["00b1", "0061"]] + }, + { + "params": ["1", "98"], + "output": [["00b1", "0062"]] + }, + { + "params": ["1", "99"], + "output": [["00b1", "0063"]] + }, + { + "params": ["1", "100"], + "output": [["00b1", "0064"]] + }, + { + "params": ["1", "101"], + "output": [["00b1", "0065"]] + }, + { + "params": ["1", "102"], + "output": [["00b1", "0066"]] + }, + { + "params": ["1", "103"], + "output": [["00b1", "0067"]] + }, + { + "params": ["1", "104"], + "output": [["00b1", "0068"]] + }, + { + "params": ["1", "105"], + "output": [["00b1", "0069"]] + }, + { + "params": ["1", "106"], + "output": [["00b1", "006a"]] + }, + { + "params": ["1", "107"], + "output": [["00b1", "006b"]] + }, + { + "params": ["1", "108"], + "output": [["00b1", "006c"]] + }, + { + "params": ["1", "109"], + "output": [["00b1", "006d"]] + }, + { + "params": ["1", "110"], + "output": [["00b1", "006e"]] + }, + { + "params": ["1", "111"], + "output": [["00b1", "006f"]] + }, + { + "params": ["1", "112"], + "output": [["00b1", "0070"]] + }, + { + "params": ["1", "113"], + "output": [["00b1", "0071"]] + }, + { + "params": ["1", "114"], + "output": [["00b1", "0072"]] + }, + { + "params": ["1", "115"], + "output": [["00b1", "0073"]] + }, + { + "params": ["1", "116"], + "output": [["00b1", "0074"]] + }, + { + "params": ["1", "117"], + "output": [["00b1", "0075"]] + }, + { + "params": ["1", "118"], + "output": [["00b1", "0076"]] + }, + { + "params": ["1", "119"], + "output": [["00b1", "0077"]] + }, + { + "params": ["1", "120"], + "output": [["00b1", "0078"]] + }, + { + "params": ["1", "121"], + "output": [["00b1", "0079"]] + }, + { + "params": ["1", "122"], + "output": [["00b1", "007a"]] + }, + { + "params": ["1", "123"], + "output": [["00b1", "007b"]] + }, + { + "params": ["1", "124"], + "output": [["00b1", "007c"]] + }, + { + "params": ["1", "125"], + "output": [["00b1", "007d"]] + }, + { + "params": ["1", "126"], + "output": [["00b1", "007e"]] + }, + { + "params": ["1", "127"], + "output": [["00b1", "007f"]] + }, + { + "params": ["1", "128"], + "output": [["00b1", "0080"]] + } + ] + }, + "Blink": { + "function": "libx52_set_blink", + "tests": [ + {"params": ["0"], "output": [["00b4", "0050"]]}, + {"params": ["1"], "output": [["00b4", "0051"]]} + ] + }, + "Shift": { + "function": "libx52_set_shift", + "tests": [ + {"params": ["0"], "output": [["00fd", "0050"]]}, + {"params": ["1"], "output": [["00fd", "0051"]]} + ] + } +} +