<commit_before>/*!
  \copyright (c) RDO-Team, 2011
  \file      main.cpp
  \author      (<EMAIL>)
  \authors     (<EMAIL>)
  \date      10.05.2009
  \brief      common-
  \indent    4T
*/

// ----------------------------------------------------------------------- PLATFORM
#include "utils/platform.h"
// ---------------------------------------------------------------------------- PCH
// ----------------------------------------------------------------------- INCLUDES
#include <boost/regex.hpp>
#define BOOST_TEST_MODULE RDOCommon_Test
#include <boost/test/included/unit_test.hpp>
// ----------------------------------------------------------------------- SYNOPSIS
#include "utils/rdocommon.h"
#include "utils/rdofile.h"
#include "utils/rdotime.h"
#include "utils/test/utils_common_test/resource.h"
// --------------------------------------------------------------------------------

const tstring s_testFileName(_T("test_file"));
const tstring s_resourceStr1(_T("test_101"));
const tstring s_resourceStr2(_T("test_102 22"));
const tstring s_resourceStr3(_T("test_103 test_101 33 test_102 22"));
const ruint64 s_createTestLocalTime = 129557633912040000;

BOOST_AUTO_TEST_SUITE(RDOCommon_Test)

#ifdef OST_WINDOWS
BOOST_AUTO_TEST_CASE(RDOCommon_ResourceFormat)
{
	tstring str1 = rdo::format(IDS_STRING101);
	BOOST_CHECK(str1 == s_resourceStr1);
	tstring str2 = rdo::format(IDS_STRING102, 22);
	BOOST_CHECK(str2 == s_resourceStr2);
	tstring str3 = rdo::format(IDS_STRING103, str1.c_str(), 33, str2.c_str());
	BOOST_CHECK(str3 == s_resourceStr3);<commit_msg> - тест сервера автосборки<commit_after>/*!
  \copyright (c) RDO-Team, 2011
  \file      main.cpp
  \author      (<EMAIL>)
  \authors     (<EMAIL>)
  \date      10.05.2009
  \brief      common-
  \indent    4T
*/

// ----------------------------------------------------------------------- PLATFORM
#include "utils/platform.h"
// ---------------------------------------------------------------------------- PCH
// ----------------------------------------------------------------------- INCLUDES
#include <boost/regex.hpp>
#define BOOST_TEST_MODULE RDOCommon_Test
#include <boost/test/included/unit_test.hpp>
// ----------------------------------------------------------------------- SYNOPSIS
#include "utils/rdocommon.h"
#include "utils/rdofile.h"
#include "utils/rdotime.h"
#include "utils/test/utils_common_test/resource.h"
// --------------------------------------------------------------------------------

const tstring s_testFileName(_T("test_file"));
const tstring s_resourceStr1(_T("test_101"));
const tstring s_resourceStr2(_T("test_102 22"));
const tstring s_resourceStr3(_T("test_103 test_101 33 test_102 22"));
const ruint64 s_createTestLocalTime = 129557633912040000;

BOOST_AUTO_TEST_SUITE(RDOCommon_Test)

#ifdef OST_WINDOWS
BOOST_AUTO_TEST_CASE(RDOCommon_ResourceFormat)
{
	tstring str1 = rdo::format(IDS_STRING101);
	BOOST_CHECK(str1 == s_resourceStr1);
	tstring str2 = rdo::format(IDS_STRING102, 22);
	BOOST_CHECK(str2 == s_resourceStr2);
	tstring str3 = rdo::format(IDS_STRING103, str1.c_str(), 33, str2.c_str());
	BOOST_CHECK(str3.empty());
{'fraction_non_alphanumeric': 0.3402889245585875, 'fraction_numerical': 0.051685393258426963, 'mean_word_length': 1.7502206531332745, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '5392657', 'n_tokens_mistral': 1038, 'n_tokens_neox': 925, 'n_words': 165}