<commit_before>#include "material_tests.h"

#include <cmath>

#include <gtest/gtest.h>

#include "cyc_limits.h"
#include "toolkit/mat_query.h"
#include "error.h"

namespace cyclus {

TEST_F(MaterialTest, Constructors) {
  EXPECT_EQ(default_mat_->units(), "kg");
  EXPECT_EQ(default_mat_->type(), cyclus::Material::kType);
  EXPECT_GE(default_mat_->obj_id(), 0);
}

TEST_F(MaterialTest, Clone) {
  Resource::Ptr clone_mat;
  ASSERT_NO_THROW(clone_mat = test_mat_->Clone());

  EXPECT_EQ(test_mat_->type(), clone_mat->type());
  EXPECT_EQ(test_mat_->units(), clone_mat->units());
  EXPECT_DOUBLE_EQ(test_mat_->quantity(), clone_mat->quantity());
}

TEST_F(MaterialTest, ExtractRes) {
  EXPECT_DOUBLE_EQ(test_size_, test_mat_->quantity());
  double other_size = test_size_ / 3;
  Resource::Ptr other;
  ASSERT_NO_THROW(other = test_mat_->ExtractRes(other_size));
  EXPECT_DOUBLE_EQ(test_size_ - other_size, test_mat_->quantity());
  EXPECT_DOUBLE_EQ(other_size, other->quantity());
}

TEST_F(MaterialTest, SimpleAbsorb) {
  double val = 1.5 * units::kg;
  Material::Ptr m1 = Material::CreateUntracked(val, test_comp_);
  Material::Ptr m2 = Material::CreateUntracked(val, test_comp_);
  ASSERT_EQ(m1->comp(), m2->comp());
  ASSERT_EQ(m1->quantity(), m2->quantity());

  m2->Absorb(m1);
<commit_msg>testing failure<commit_after>#include "material_tests.h"

#include <cmath>

#include <gtest/gtest.h>

#include "cyc_limits.h"
#include "toolkit/mat_query.h"
#include "error.h"

namespace cyclus {

TEST_F(MaterialTest, Constructors) {
  EXPECT_EQ(default_mat_->units(), "kg");
  EXPECT_EQ(default_mat_->type(), cyclus::Material::kType);
  EXPECT_GE(default_mat_->obj_id(), 0);
}

TEST_F(MaterialTest, Clone) {
  Resource::Ptr clone_mat;
  ASSERT_NO_THROW(clone_mat = test_mat_->Clone());

  EXPECT_EQ(test_mat_->type(), clone_mat->type());
  EXPECT_EQ(test_mat_->units(), clone_mat->units());
  EXPECT_DOUBLE_EQ(test_mat_->quantity(), clone_mat->quantity());
}

TEST_F(MaterialTest, ExtractRes) {
  EXPECT_DOUBLE_EQ(test_size_, test_mat_->quantity());
  double other_size = test_size_ / 3;
  Resource::Ptr other;
  ASSERT_NO_THROW(other = test_mat_->ExtractRes(other_size));
  EXPECT_DOUBLE_EQ(test_size_ - other_size, test_mat_->quantity());
  EXPECT_DOUBLE_EQ(other_size, other->quantity());
}

TEST_F(MaterialTest, SimpleAbsorb) {
  double val = 1.5 * units::kg;
  Material::Ptr m1 = Material::CreateUntracked(val, test_comp_);
  Material::Ptr m2 = Material::CreateUntracked(val, test_comp_);
  ASSERT_EQ(m1->comp(), m2->comp());
  ASSERT_EQ(m1->quantity() - 1, m2->quantity());

  m2->Absorb(m1);

{'fraction_non_alphanumeric': 0.1676946800308404, 'fraction_numerical': 0.00963762528912876, 'mean_word_length': 6.700296735905044, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 45, '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': '6309421', 'n_tokens_mistral': 972, 'n_tokens_neox': 974, 'n_words': 142}