<commit_before>/**
 * \file
 * \brief Semaphore C-API compile/link test
 *
 * The only purpose of this test is to ensure semaphore C-API can be used from C code and that whole application can be
 * linked correctly. It just uses all types, macros and functions from the tested header.
 *
 * \author Copyright (C) 2017 <NAME> http://www.distortec.com http://www.freddiechopin.info
 *
 * \par License
 * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not
 * distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
 */

#include "distortos/C-API/Semaphore.h"

#include <stddef.h>

/*---------------------------------------------------------------------------------------------------------------------+
| global functions
+---------------------------------------------------------------------------------------------------------------------*/

void compileLinkTest()
{
	{
		struct distortos_Semaphore semaphore = DISTORTOS_SEMAPHORE_INITIALIZER(semaphore, 0, 0);
	}
	{
		DISTORTOS_SEMAPHORE_CONSTRUCT_1(semaphore, 0, 0);
	}
	{
		DISTORTOS_SEMAPHORE_CONSTRUCT(semaphore, 0);
	}

	distortos_Semaphore_construct_1(NULL, 0, 0);
	distortos_Semaphore_construct(NULL, 0);
	distortos_Semaphore_destruct(NULL);
	distortos_Semaphore_getValue(NULL, NULL);
	distortos_Semaphore_post(NULL);
	distortos_Semaphore_tryWait(NULL);
	distortos_Semaphore_tryWaitFor(NULL, 0);
	distortos_Semaphore_tryWaitUntil(NULL, 0);
	distortos_Semaphore_wait(NULL);
}<commit_msg>Add distortos_Semaphore_getMaxValue() to compile/link unit test<commit_after>/**
 * \file
 * \brief Semaphore C-API compile/link test
 *
 * The only purpose of this test is to ensure semaphore C-API can be used from C code and that whole application can be
 * linked correctly. It just uses all types, macros and functions from the tested header.
 *
 * \author Copyright (C) 2017-2019 <NAME> http://www.distortec.com http://www.freddiechopin.info
 *
 * \par License
 * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not
 * distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
 */

#include "distortos/C-API/Semaphore.h"

#include <stddef.h>

/*---------------------------------------------------------------------------------------------------------------------+
| global functions
+---------------------------------------------------------------------------------------------------------------------*/

void compileLinkTest()
{
	{
		struct distortos_Semaphore semaphore = DISTORTOS_SEMAPHORE_INITIALIZER(semaphore, 0, 0);
	}
	{
		DISTORTOS_SEMAPHORE_CONSTRUCT_1(semaphore, 0, 0);
	}
	{
		DISTORTOS_SEMAPHORE_CONSTRUCT(semaphore, 0);
	}

	distortos_Semaphore_construct_1(NULL, 0, 0);
	distortos_Semaphore_construct(NULL, 0);
	distortos_Semaphore_destruct(NULL);
	distortos_Semaphore_getMaxValue(NULL, NULL);
	distortos_Semaphore_getValue(NULL, NULL);
	distortos_Semaphore_post(NULL);
	distortos_Semaphore_tryWait(NULL);
	distortos_Semaphore_tryWaitFor(NULL, 0);
	distortos_Semaphore_tryWaitUntil(NULL, 0);
	distortos_Semaphore_wait(NULL);
}
{'fraction_non_alphanumeric': 0.23503325942350334, 'fraction_numerical': 0.013937282229965157, 'mean_word_length': 2.4438386041439477, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5775722', 'n_tokens_mistral': 1044, 'n_tokens_neox': 984, 'n_words': 249}