<commit_before>#include <Core/Resources/Resources.hpp>
#include <catch2/catch.hpp>

int dummy() {
    return 42;
}
TEST_CASE( "Core/Resources", "[Core]" ) {
    using namespace Ra::Core::Resources;
    auto radiumResourcesPath = getRadiumResourcesPath();
    auto radiumPluginPath    = getRadiumPluginsPath();
    auto basePath            = getBasePath();
    auto baseResourcesPath   = getResourcesPath();
    auto baseResourcesPath1 =
        getResourcesPath( reinterpret_cast<void*>( getRadiumResourcesPath ), "Resources" );
    auto baseResourcesPath2 = getResourcesPath( reinterpret_cast<void*>( dummy ), "" );
    auto baseResourcesPath3 = getResourcesPath( nullptr, "" );
    auto baseResourcesPath4 = getResourcesPath( nullptr, "hopeYouDontHaveAPathWithThisName" );

    std::cout << radiumResourcesPath.value_or( "not found" ) << "\n"
              << radiumPluginPath.value_or( "not found" ) << "\n"
              << basePath.value_or( "not found" ) << "\n"
              << baseResourcesPath.value_or( "not found" ) << "\n"
              << baseResourcesPath1.value_or( "not found" ) << "\n"
              << baseResourcesPath2.value_or( "not found" ) << "\n";

    REQUIRE( baseResourcesPath1 == radiumResourcesPath );
    REQUIRE( baseResourcesPath2 == basePath );
    REQUIRE( baseResourcesPath2 == baseResourcesPath3 );
    REQUIRE( !baseResourcesPath4 );
}<commit_msg>[tests] update resources unittest.<commit_after>#include <Core/Resources/Resources.hpp>
#include <catch2/catch.hpp>

int dummy() {
    return 42;
}
TEST_CASE( "Core/Resources", "[Core]" ) {
    using namespace Ra::Core::Resources;
    auto radiumResourcesPath = getRadiumResourcesPath();
    auto radiumPluginPath    = getRadiumPluginsPath();
    auto basePath            = getBasePath();
    auto baseResourcesPath   = getResourcesPath();
    auto baseResourcesPath1 =
        getResourcesPath( reinterpret_cast<void*>( getRadiumResourcesPath ), "Resources/Radium" );
    auto baseResourcesPath2 = getResourcesPath( reinterpret_cast<void*>( dummy ), "" );
    auto baseResourcesPath3 = getResourcesPath( nullptr, "" );
    auto baseResourcesPath4 = getResourcesPath( nullptr, "hopeYouDontHaveAPathWithThisName" );

    std::cout << radiumResourcesPath.value_or( "not found" ) << "\n"
              << radiumPluginPath.value_or( "not found" ) << "\n"
              << basePath.value_or( "not found" ) << "\n"
              << baseResourcesPath.value_or( "not found" ) << "\n"
              << baseResourcesPath1.value_or( "not found" ) << "\n"
              << baseResourcesPath2.value_or( "not found" ) << "\n";

    REQUIRE( baseResourcesPath1 == radiumResourcesPath );
    REQUIRE( baseResourcesPath2 == basePath );
    REQUIRE( baseResourcesPath2 == baseResourcesPath3 );
    REQUIRE( !baseResourcesPath4 );
}
{'fraction_non_alphanumeric': 0.13295210864903503, 'fraction_numerical': 0.010007147962830594, 'mean_word_length': 3.588524590163934, 'pattern_counts': {'":': 0, '<': 59, '<?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': '4103103', 'n_tokens_mistral': 838, 'n_tokens_neox': 815, 'n_words': 167}