<commit_before>#include "catch.hpp"
#include "build_machine.hpp"

#include "compass.hpp"

#include <bitset>
#include <vector>
#include <iostream>
#include <string>
#include <algorithm>

TEST_CASE_METHOD( host_reference, "machine_specific" ){

  SECTION( "vendor_right" ){

    auto value = compass::runtime::vendor();

    REQUIRE(value.size()!=0u);

    // std::transform(value.begin(), value.end(),
    //                value.begin(),
    //                ::tolower);

    REQUIRE(value.find(expected_vendor)!=std::string::npos);

  }


  SECTION( "brand_right" ){

    auto value = compass::runtime::brand();

    REQUIRE(value.empty()!=true);
    REQUIRE_THAT(value, Catch::Matchers::Contains(expected_brand) );

  }

  SECTION( "device_name_right" ){

    auto value = compass::runtime::device_name();

    REQUIRE(value.size() == expected_device_name.size());

    if(expected_device_name.size()>0){
        REQUIRE_THAT(value, Catch::Matchers::Contains(expected_device_name) );
    }

  }

  SECTION( "ncores_right" ){

    auto value = compass::runtime::threads();

    REQUIRE(value!=0);
    REQUIRE(value==expected_ncores);
  }

  // SECTION( "physical_cores_right" ){

  //   auto value = compass::runtime::physical_threads();

  //   REQUIRE(value!=0);
  //   REQUIRE(value==expected_nphyscores);
  // }

  SECTION( "has_sse_right_at_ct" ){

    auto value = compass::compiletime::has<compass::feature::sse()>::enabled;

    REQUIRE(true);//this just needs to compile

  }

  SECTION( "has_sse_right" ){<commit_msg>updated test logic in case a device name was not found by cmake<commit_after>#include "catch.hpp"
#include "build_machine.hpp"

#include "compass.hpp"

#include <bitset>
#include <vector>
#include <iostream>
#include <string>
#include <algorithm>

TEST_CASE_METHOD( host_reference, "machine_specific" ){

  SECTION( "vendor_right" ){

    auto value = compass::runtime::vendor();

    REQUIRE(value.size()!=0u);

    // std::transform(value.begin(), value.end(),
    //                value.begin(),
    //                ::tolower);

    REQUIRE(value.find(expected_vendor)!=std::string::npos);

  }


  SECTION( "brand_right" ){

    auto value = compass::runtime::brand();

    REQUIRE(value.empty()!=true);
    REQUIRE_THAT(value, Catch::Matchers::Contains(expected_brand) );

  }

  SECTION( "device_name_right" ){

    auto value = compass::runtime::device_name();

    if(expected_device_name.size()>0){
        REQUIRE(value.size() == expected_device_name.size());
        REQUIRE_THAT(value, Catch::Matchers::Contains(expected_device_name) );
    } else {
        REQUIRE(value.size()>0);
    }

  }

  SECTION( "ncores_right" ){

    auto value = compass::runtime::threads();

    REQUIRE(value!=0);
    REQUIRE(value==expected_ncores);
  }

  // SECTION( "physical_cores_right" ){

  //   auto value = compass::runtime::physical_threads();

  //   REQUIRE(value!=0);
  //   REQUIRE(value==expected_nphyscores);
  // }

  SECTION( "has_sse_right_at_ct" ){

    auto value = compass::compiletime::has<compass::feature::sse()>::enabled;

    REQUIRE(true);//this just needs to compile

  }

  SECTION( "has_sse_right" ){
{'fraction_non_alphanumeric': 0.16756414317389928, 'fraction_numerical': 0.0028508077288565093, 'mean_word_length': 3.7921092564491654, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 18, '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': '943029', 'n_tokens_mistral': 1148, 'n_tokens_neox': 1051, 'n_words': 162}