mirror of https://github.com/ARMmbed/mbed-os.git
Update namespace from v0 to v1.
parent
d59284850d
commit
c2343b223b
|
@ -18,7 +18,7 @@
|
|||
|
||||
#include "utest/case.h"
|
||||
|
||||
using namespace utest::v0;
|
||||
using namespace utest::v1;
|
||||
|
||||
// normal handler
|
||||
Case::Case(const char *description,
|
||||
|
|
|
@ -19,15 +19,15 @@
|
|||
#include "utest/default_handlers.h"
|
||||
#include "utest/case.h"
|
||||
|
||||
using namespace utest::v0;
|
||||
using namespace utest::v1;
|
||||
|
||||
status_t utest::v0::verbose_test_setup_handler(const size_t number_of_cases)
|
||||
status_t utest::v1::verbose_test_setup_handler(const size_t number_of_cases)
|
||||
{
|
||||
printf(">>> Running %u test cases...\n", number_of_cases);
|
||||
return STATUS_CONTINUE;
|
||||
}
|
||||
|
||||
void utest::v0::verbose_test_teardown_handler(const size_t passed, const size_t failed, const failure_t failure)
|
||||
void utest::v1::verbose_test_teardown_handler(const size_t passed, const size_t failed, const failure_t failure)
|
||||
{
|
||||
printf("\n>>> Test cases: %u passed, %u failed", passed, failed);
|
||||
if (failure == FAILURE_NONE) {
|
||||
|
@ -38,13 +38,13 @@ void utest::v0::verbose_test_teardown_handler(const size_t passed, const size_t
|
|||
if (failed) printf(">>> TESTS FAILED!\n");
|
||||
}
|
||||
|
||||
status_t utest::v0::verbose_case_setup_handler(const Case *const source, const size_t index_of_case)
|
||||
status_t utest::v1::verbose_case_setup_handler(const Case *const source, const size_t index_of_case)
|
||||
{
|
||||
printf("\n>>> Running case #%u: '%s'...\n", index_of_case + 1, source->get_description());
|
||||
return STATUS_CONTINUE;
|
||||
}
|
||||
|
||||
status_t utest::v0::verbose_case_teardown_handler(const Case *const source, const size_t passed, const size_t failed, const failure_t failure)
|
||||
status_t utest::v1::verbose_case_teardown_handler(const Case *const source, const size_t passed, const size_t failed, const failure_t failure)
|
||||
{
|
||||
printf(">>> '%s': %u passed, %u failed", source->get_description(), passed, failed);
|
||||
if (failure == FAILURE_NONE) {
|
||||
|
@ -55,7 +55,7 @@ status_t utest::v0::verbose_case_teardown_handler(const Case *const source, cons
|
|||
return STATUS_CONTINUE;
|
||||
}
|
||||
|
||||
status_t utest::v0::verbose_case_failure_handler(const Case *const /*source*/, const failure_t reason)
|
||||
status_t utest::v1::verbose_case_failure_handler(const Case *const /*source*/, const failure_t reason)
|
||||
{
|
||||
if (reason != FAILURE_ASSERTION) {
|
||||
printf(">>> failed with reason '%s'\n", stringify(reason));
|
||||
|
@ -65,7 +65,7 @@ status_t utest::v0::verbose_case_failure_handler(const Case *const /*source*/, c
|
|||
|
||||
|
||||
|
||||
status_t utest::v0::greentea_test_setup_handler(const size_t /*number_of_cases*/)
|
||||
status_t utest::v1::greentea_test_setup_handler(const size_t /*number_of_cases*/)
|
||||
{
|
||||
printf(">>> I do not know how to tell greentea that the test started, since\n");
|
||||
printf(">>> you forgot to override the `test_setup_handler` in your specification.\n");
|
||||
|
@ -73,7 +73,7 @@ status_t utest::v0::greentea_test_setup_handler(const size_t /*number_of_cases*/
|
|||
return STATUS_ABORT;
|
||||
}
|
||||
|
||||
void utest::v0::greentea_test_teardown_handler(const size_t passed, const size_t failed, const failure_t failure)
|
||||
void utest::v1::greentea_test_teardown_handler(const size_t passed, const size_t failed, const failure_t failure)
|
||||
{
|
||||
verbose_test_teardown_handler(passed, failed, failure);
|
||||
if (failed || failure != FAILURE_NONE) {
|
||||
|
@ -84,7 +84,7 @@ void utest::v0::greentea_test_teardown_handler(const size_t passed, const size_t
|
|||
printf("{{end}}\n");
|
||||
}
|
||||
|
||||
status_t utest::v0::greentea_case_failure_handler(const Case *const source, const failure_t reason)
|
||||
status_t utest::v1::greentea_case_failure_handler(const Case *const source, const failure_t reason)
|
||||
{
|
||||
verbose_case_failure_handler(source, reason);
|
||||
return STATUS_ABORT;
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include "minar/minar.h"
|
||||
#include "core-util/CriticalSectionLock.h"
|
||||
|
||||
using namespace utest::v0;
|
||||
using namespace utest::v1;
|
||||
|
||||
|
||||
namespace
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
#include "utest/types.h"
|
||||
|
||||
const char* utest::v0::stringify(utest::v0::failure_t failure)
|
||||
const char* utest::v1::stringify(utest::v1::failure_t failure)
|
||||
{
|
||||
switch(failure)
|
||||
{
|
||||
|
|
|
@ -21,5 +21,5 @@
|
|||
extern "C"
|
||||
void utest_unity_assert_failure()
|
||||
{
|
||||
utest::v0::Harness::raise_failure(utest::v0::FAILURE_ASSERTION);
|
||||
utest::v1::Harness::raise_failure(utest::v1::FAILURE_ASSERTION);
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
|
||||
namespace utest {
|
||||
namespace v0 {
|
||||
namespace v1 {
|
||||
|
||||
/** Test case wrapper class.
|
||||
*
|
||||
|
@ -123,7 +123,7 @@ namespace v0 {
|
|||
friend class Harness;
|
||||
};
|
||||
|
||||
} // namespace v0
|
||||
} // namespace v1
|
||||
} // namespace utest
|
||||
|
||||
#endif // UTEST_CASES_H
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
|
||||
namespace utest {
|
||||
namespace v0 {
|
||||
namespace v1 {
|
||||
|
||||
/** Default handler hint.
|
||||
*
|
||||
|
@ -167,7 +167,7 @@ namespace v0 {
|
|||
/// The greentea aborting handlers are the default
|
||||
const handlers_t default_handlers = greentea_abort_handlers;
|
||||
|
||||
} // namespace v0
|
||||
} // namespace v1
|
||||
} // namespace utest
|
||||
|
||||
#endif // UTEST_DEFAULT_HANDLER_H
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
|
||||
namespace utest {
|
||||
namespace v0 {
|
||||
namespace v1 {
|
||||
|
||||
/** Test Harness.
|
||||
*
|
||||
|
@ -67,7 +67,7 @@ namespace v0 {
|
|||
static void schedule_next_case();
|
||||
};
|
||||
|
||||
} // namespace v0
|
||||
} // namespace v1
|
||||
} // namespace utest
|
||||
|
||||
#endif // UTEST_HARNESS_H
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
|
||||
|
||||
namespace utest {
|
||||
namespace v0 {
|
||||
namespace v1 {
|
||||
|
||||
/** Test specification containing the setup and teardown handlers and test cases.
|
||||
*
|
||||
|
@ -91,7 +91,7 @@ namespace v0 {
|
|||
friend class Harness;
|
||||
};
|
||||
|
||||
} // namespace v0
|
||||
} // namespace v1
|
||||
} // namespace utest
|
||||
|
||||
#endif // UTEST_SPECIFICATION_H
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
|
||||
namespace utest {
|
||||
namespace v0 {
|
||||
namespace v1 {
|
||||
|
||||
enum repeat_t {
|
||||
REPEAT_NO_REPEAT = 0, ///< continue with the next test case
|
||||
|
@ -220,7 +220,7 @@ namespace v0 {
|
|||
*/
|
||||
typedef status_t (*case_failure_handler_t)(const Case *const source, const failure_t reason);
|
||||
|
||||
} // namespace v0
|
||||
} // namespace v1
|
||||
} // namespace utest
|
||||
|
||||
#endif // UTEST_TYPES_H
|
||||
|
|
Loading…
Reference in New Issue