blob: 702aa8ec644a92f20825020c10ba0f2673189ddf (
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 2020 The Chromium OS Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*
* Test USB Protocol Layer module.
*/
#include "common.h"
#include "task.h"
#include "tcpm.h"
#include "test_util.h"
#include "timer.h"
#include "usb_emsg.h"
#include "usb_pd_test_util.h"
#include "usb_pd.h"
#include "usb_pe_sm.h"
#include "usb_prl_sm.h"
#include "usb_sm_checks.h"
#include "usb_tc_sm.h"
#include "util.h"
#include "mock/tcpc_mock.h"
#define PORT0 0
/* Install Mock TCPC and MUX drivers */
const struct tcpc_config_t tcpc_config[CONFIG_USB_PD_PORT_MAX_COUNT] = {
{
.drv = &mock_tcpc_driver,
},
};
void before_test(void)
{
}
void run_test(int argc, char **argv)
{
/* TODO add tests here */
/* Do basic state machine sanity checks last. */
RUN_TEST(test_prl_no_parent_cycles);
RUN_TEST(test_prl_no_empty_state);
RUN_TEST(test_prl_all_states_named);
test_print_result();
}
|