<commit_before>#include "analemma.h"
#include "gtest/gtest.h"
#include <fstream>
#include <string>
#include "functions.h"
#include <vector>

TEST(AnalemmaTests, TestLancaster)
{
    stadic::Analemma suns("USA_PA_Lancaster.AP.725116_TMY3.epw");
    suns.setGeoFile("sunsGeo.rad");
    suns.setMatFile("sunsMat.rad");
    suns.setRotation(0);
    suns.setSMXFile("suns.smx");
    ASSERT_TRUE(suns.genSun());
    std::fstream iFile;
    iFile.open("sunsGeo.rad");
    ASSERT_TRUE(iFile.is_open());
    std::string line;
    int counter=0;
    while (std::getline(iFile, line)){
        counter++;
        if (counter==10){
            std::vector<std::string> vals;
            vals=stadic::trimmedSplit(line,' ');
            ASSERT_EQ(10,vals.size());
            EXPECT_EQ("solar10",vals[0]);
            EXPECT_EQ("source",vals[1]);
            EXPECT_EQ("sun10",vals[2]);
            EXPECT_EQ("0",vals[3]);
            EXPECT_EQ("0",vals[4]);
            EXPECT_EQ("4",vals[5]);
            EXPECT_EQ("0.963768",vals[6]);
            EXPECT_EQ("0.250951",vals[7]);
            EXPECT_EQ("0.0904094",vals[8]);
            EXPECT_EQ("0.533",vals[9]);
        }
    }
    iFile.close();
    EXPECT_EQ(1511, counter);
    //EXPECT_NEAR(1500,counter,15);
    iFile.open("sunsMat.rad");
    ASSERT_TRUE(iFile.is_open());
    while (std::getline(iFile, line)){
        counter++;
        if (counter==10){
            std::vector<std::string> vals;
            vals=stadic::trimmedSplit(line,' ');

        }
    }
    iFile.close();



}
<commit_msg>Added material and smx file tests to analemmatest<commit_after>#include "analemma.h"
#include "gtest/gtest.h"
#include <fstream>
#include <string>
#include "functions.h"
#include <vector>

TEST(AnalemmaTests, TestLancaster)
{
    stadic::Analemma suns("USA_PA_Lancaster.AP.725116_TMY3.epw");
    suns.setGeoFile("sunsGeo.rad");
    suns.setMatFile("sunsMat.rad");
    suns.setRotation(0);
    suns.setSMXFile("suns.smx");
    ASSERT_TRUE(suns.genSun());
    std::fstream iFile;
    iFile.open("sunsGeo.rad");
    ASSERT_TRUE(iFile.is_open());
    std::string line;
    int counter=0;
    while (std::getline(iFile, line)){
        counter++;
        if (counter==10){
            std::vector<std::string> vals;
            vals=stadic::trimmedSplit(line,' ');
            ASSERT_EQ(10,vals.size());
            EXPECT_EQ("solar10",vals[0]);
            EXPECT_EQ("source",vals[1]);
            EXPECT_EQ("sun10",vals[2]);
            EXPECT_EQ("0",vals[3]);
            EXPECT_EQ("0",vals[4]);
            EXPECT_EQ("4",vals[5]);
            EXPECT_EQ("0.963768",vals[6]);
            EXPECT_EQ("0.250951",vals[7]);
            EXPECT_EQ("0.0904094",vals[8]);
            EXPECT_EQ("0.533",vals[9]);
        }
    }
    iFile.close();
    EXPECT_EQ(1511, counter);
    //EXPECT_NEAR(1500,counter,15);
    iFile.open("sunsMat.rad");
    ASSERT_TRUE(iFile.is_open());
    counter=0;
    while (std::getline(iFile, line)){
        counter++;
        if (counter==10){
            std::vector<std::string> vals;
            vals=stadic::trimmedSplit(line,' ');
            ASSERT_EQ(9,vals.size());
            EXPECT_EQ("void",vals[0]);
            EXPECT_EQ("light",vals[1]);
            EXPECT_EQ("solar10",vals[2]);
            EXPECT_EQ("0",vals[3]);
            EXPECT_EQ("0",vals[4]);
            EXPECT_EQ("3",vals[5]);
            EXPECT_EQ("1.0",vals[6]);
            EXPECT_EQ("1.0",vals[7]);
            EXPECT_EQ("1.0",vals[8]);

        }
    }
    iFile.close();
    EXPECT_EQ(1511, counter);
    iFile.open("suns.smx");
    ASSERT_TRUE(iFile.is_open());
    counter=0;
    while (std::getline(iFile, line)){
        counter++;
        if (counter==5838){
            std::vector<std::string> vals;
            vals=stadic::trimmedSplit(line,'\t');
            ASSERT_EQ(3,vals.size());
            EXPECT_EQ("1.54e+004",vals[0]);
            EXPECT_EQ("1.54e+004",vals[1]);
            EXPECT_EQ("1.54e+004",vals[2]);

        }
    }
    iFile.close();
    EXPECT_EQ(13236360, counter);



}

{'fraction_non_alphanumeric': 0.18484698914116485, 'fraction_numerical': 0.048617966436327736, 'mean_word_length': 2.5304878048780486, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 14, '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': '6575940', 'n_tokens_mistral': 1540, 'n_tokens_neox': 1491, 'n_words': 169}