summaryrefslogtreecommitdiff
path: root/test/regression/usbx_ux_host_class_hub_entry_test.c
blob: 01601515476df875153727b9d458dbf6504f6308 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/***************************************************************************/
/* Copyright (c) 2024 Microsoft Corporation                                */
/* Copyright (c) 2026 Eclipse ThreadX contributors                         */
/*                                                                         */
/* This program and the accompanying materials are made available under    */
/* the terms of the MIT License which is available at                      */
/* https://opensource.org/licenses/MIT.                                    */
/*                                                                         */
/* SPDX-License-Identifier: MIT                                            */
/***************************************************************************/

/* This tests the ux_host_class_hub_entry.c API. */

#include "usbx_ux_test_hub.h"

#ifdef CTEST
void test_application_define(void *first_unused_memory)
#else
void usbx_ux_host_class_hub_entry_test_application_define(void *first_unused_memory)
#endif
{

    /* Inform user.  */
    printf("Running ux_host_class_hub_entry Test................................ ");

    stepinfo("\n");

    initialize_hub(first_unused_memory);
}

static void post_init_host()
{

UX_HOST_CLASS_COMMAND command;

    /** Test unknown function. **/

    command.ux_host_class_command_request = (~0);

    ux_test_add_action_to_main_list(create_error_match_action(UX_SYSTEM_LEVEL_THREAD, UX_SYSTEM_CONTEXT_CLASS, UX_FUNCTION_NOT_SUPPORTED));
    UX_TEST_ASSERT(_ux_host_class_hub_entry(&command) != UX_SUCCESS);
}

static void post_init_device()
{
}