<commit_before><commit_msg>Tests for tmp<commit_after>//=======================================================================
// Copyright (c) 2015 <NAME>
// Distributed under the terms of the MIT License.
// (See accompanying file LICENSE or copy at
//  http://opensource.org/licenses/MIT)
//=======================================================================

#include "catch.hpp"

#include "cpp_utils/tmp.hpp"

TEST_CASE( "tmp/variadic_contains/1", "[tmp]" ) {
    REQUIRE((cpp::variadic_contains<double, std::string, int, double>::value));
    REQUIRE(!(cpp::variadic_contains<double, std::string, int, long double>::value));
    REQUIRE((cpp::variadic_contains<std::string, std::string>::value));
    REQUIRE(!(cpp::variadic_contains<std::string>::value));
    REQUIRE(!(cpp::variadic_contains<std::string, double>::value));
}

TEST_CASE( "tmp/type_list/1", "[tmp]" ) {
    REQUIRE((cpp::type_list<std::string, double, int>::contains<int>()));
    REQUIRE(!(cpp::type_list<std::string, double, int>::contains<long int>()));
    REQUIRE((cpp::type_list<std::string>::contains<std::string>()));
    REQUIRE(!(cpp::type_list<>::contains<std::string>()));
}

TEST_CASE( "tmp/is_homegeneous/1", "[tmp]" ) {
    REQUIRE((cpp::is_homogeneous<std::size_t, std::size_t, unsigned long>::value));
    REQUIRE((cpp::is_homogeneous<int, int>::value));
    REQUIRE(!(cpp::is_homogeneous<int, long>::value));
    REQUIRE(!(cpp::is_homogeneous<std::string, long>::value));
    REQUIRE((cpp::is_homogeneous<long>::value));
}
{'fraction_non_alphanumeric': 0.29183135704874835, 'fraction_numerical': 0.00461133069828722, 'mean_word_length': 7.780346820809249, 'pattern_counts': {'":': 0, '<': 22, '<?xml version=': 0, '>': 22, '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': '4459294', 'n_tokens_mistral': 519, 'n_tokens_neox': 481, 'n_words': 70}