aboutsummaryrefslogtreecommitdiff
path: root/components/messaging/ffa/libsp/test/test_mock_assert.cpp
blob: 39004d6452121bb5c6b58328ce80fb3d33877e5a (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
// SPDX-License-Identifier: BSD-3-Clause
/*
 * Copyright (c) 2020-2021, Arm Limited. All rights reserved.
 */

#include <assert.h>
#include <CppUTest/TestHarness.h>
#include <CppUTestExt/MockSupport.h>
#include "mock_assert.h"

TEST_GROUP(mock_assert)
{
	TEST_TEARDOWN()
	{
		mock().checkExpectations();
		mock().clear();
	}
};

TEST(mock_assert, assert)
{
	assert_environment_t assert_env;

	if (SETUP_ASSERT_ENVIRONMENT(assert_env)) {
		assert(false);
		FAIL("Assert jump not happened"); // Should not be called
	}
}