-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.cpp
40 lines (31 loc) · 891 Bytes
/
main.cpp
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
/*
* Copyright (c) 2020 Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*/
#include "mbed.h"
#include "utest/utest.h"
#include "unity/unity.h"
#include "greentea-client/test_env.h"
using namespace utest::v1;
// This is how a test case looks
static control_t simple_test(const size_t call_count)
{
/* test content here */
TEST_ASSERT_EQUAL(4, 2 * 2);
return CaseNext;
}
utest::v1::status_t greentea_setup(const size_t number_of_cases)
{
// Here, we specify the timeout (60s) and the host test (a built-in host test or the name of our Python file)
GREENTEA_SETUP(60, "default_auto");
return greentea_test_setup_handler(number_of_cases);
}
// List of test cases in this file
Case cases[] = {
Case("simple test", simple_test)
};
Specification specification(greentea_setup, cases);
int main()
{
return !Harness::run(specification);
}