<commit_before>//======================================================================
//-----------------------------------------------------------------------
/**
 * @file		iutest_assertion_return_tests.cpp
 * @brief		iutest assertion return test
 *
 * @author		t.sirayanagi
 * @version		1.0
 *
 * @par			copyright
 * Copyright (C) 2013, <NAME>\n
 * This software is released under the new BSD License,
 * see LICENSE
*/
//-----------------------------------------------------------------------
//======================================================================

//======================================================================
// include
#include "../include/gtest/iutest_spi_switch.hpp"

#if IUTEST_HAS_ASSERTION_RETURN

static int value = 0;

int ReturnTest(void)
{
	IUTEST_ASSERT_TRUE(false) << "message" << ::iutest::AssertionReturnType<int>(-1);
	IUTEST_ASSERT_TRUE(false) << "message" << ::iutest::AssertionReturn(-1);
	return 0;
}

void ReturnTestCall(void)
{
	value = ReturnTest();
	IUTEST_ASSERT_TRUE(true) << ::iutest::AssertionReturn();
}

IUTEST(ReturnTest, Test)
{
	IUTEST_ASSERT_FATAL_FAILURE(ReturnTestCall(), "");
#if IUTEST_USE_THROW_ON_ASSERT_FAILURE
	IUTEST_ASSERT_EQ( 0, value);
#else
	IUTEST_ASSERT_EQ(-1, value);
#endif
}

#endif

#ifdef UNICODE
int wmain(int argc, wchar_t** argv)
#else
int main(int argc, char** argv)
#endif
{
	IUTEST_INIT(&argc, argv);
	return IUTEST_RUN_ALL_TESTS();
}
<commit_msg>update r445<commit_after>//======================================================================
//-----------------------------------------------------------------------
/**
 * @file		iutest_assertion_return_tests.cpp
 * @brief		iutest assertion return test
 *
 * @author		t.sirayanagi
 * @version		1.0
 *
 * @par			copyright
 * Copyright (C) 2013-2014, <NAME>\n
 * This software is released under the new BSD License,
 * see LICENSE
*/
//-----------------------------------------------------------------------
//======================================================================

//======================================================================
// include
#include "../include/gtest/iutest_spi_switch.hpp"

#if IUTEST_HAS_ASSERTION_RETURN

static int value = 0;

int ReturnTest(void)
{
	IUTEST_ASSERT_TRUE(false) << "message" << ::iutest::AssertionReturnType<int>(-1);
	IUTEST_ASSERT_TRUE(false) << "message" << ::iutest::AssertionReturn(-1);
	return 0;
}

void ReturnTestCall(void)
{
	value = ReturnTest();
	IUTEST_ASSERT_TRUE(true) << ::iutest::AssertionReturn();
}

IUTEST(ReturnTest, Test)
{
	IUTEST_ASSERT_FATAL_FAILURE(ReturnTestCall(), "");
#if IUTEST_USE_THROW_ON_ASSERTION_FAILURE
	IUTEST_ASSERT_EQ( 0, value);
#else
	IUTEST_ASSERT_EQ(-1, value);
#endif
}

#endif

#ifdef UNICODE
int wmain(int argc, wchar_t** argv)
#else
int main(int argc, char** argv)
#endif
{
	IUTEST_INIT(&argc, argv);
	return IUTEST_RUN_ALL_TESTS();
}

{'fraction_non_alphanumeric': 0.357439446366782, 'fraction_numerical': 0.010726643598615917, 'mean_word_length': 3.482170542635659, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '6187167', 'n_tokens_mistral': 941, 'n_tokens_neox': 897, 'n_words': 171}