forked from PAWPAW-Mirror/lib_xua
Split functionality into test code in pure C and helper code in XC
This commit is contained in:
12
tests/xua_unit_tests/src/test_hid.c
Normal file
12
tests/xua_unit_tests/src/test_hid.c
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
// Copyright 2021 XMOS LIMITED.
|
||||||
|
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
|
||||||
|
#include <stddef.h>
|
||||||
|
|
||||||
|
#include "xua_unit_tests.h"
|
||||||
|
#include "xua_hid_report_descriptor.h"
|
||||||
|
|
||||||
|
void test_uninitialised_hidGetReportDescriptor()
|
||||||
|
{
|
||||||
|
unsigned char* reportDescPtr = hidGetReportDescriptor();
|
||||||
|
TEST_ASSERT_NULL( reportDescPtr );
|
||||||
|
}
|
||||||
@@ -1,6 +1,13 @@
|
|||||||
// Copyright 2021 XMOS LIMITED.
|
// Copyright 2021 XMOS LIMITED.
|
||||||
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
|
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
|
||||||
#include "xua_unit_tests.h"
|
#ifdef __XC__
|
||||||
|
|
||||||
|
#include <xs1.h>
|
||||||
|
#include <platform.h>
|
||||||
|
#include <xclib.h>
|
||||||
|
|
||||||
|
#endif // __XC__
|
||||||
|
|
||||||
|
|
||||||
in port p_mclk_in = XS1_PORT_1D;
|
in port p_mclk_in = XS1_PORT_1D;
|
||||||
|
|
||||||
@@ -19,7 +26,3 @@ void AudioHwInit()
|
|||||||
{
|
{
|
||||||
; // nothing
|
; // nothing
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_null(){
|
|
||||||
TEST_ASSERT_MESSAGE(1, "Success!");
|
|
||||||
}
|
|
||||||
@@ -4,15 +4,6 @@
|
|||||||
#define XUA_UNIT_TESTS_H_
|
#define XUA_UNIT_TESTS_H_
|
||||||
|
|
||||||
#include "unity.h"
|
#include "unity.h"
|
||||||
|
|
||||||
#ifdef __XC__
|
|
||||||
|
|
||||||
#include <xs1.h>
|
|
||||||
#include <platform.h>
|
|
||||||
#include <xclib.h>
|
|
||||||
|
|
||||||
#include "xua_conf.h"
|
#include "xua_conf.h"
|
||||||
|
|
||||||
#endif // __XC__
|
|
||||||
|
|
||||||
#endif /* XUA_UNIT_TESTS_H_ */
|
#endif /* XUA_UNIT_TESTS_H_ */
|
||||||
|
|||||||
Reference in New Issue
Block a user