<commit_before>#include <matrix.hpp>
#include <catch.hpp>

SCENARIO("matrix init", "[init]") {
	matrix_t matrix;
	REQUIRE(matrix.rows() == 0);
	REQUIRE(matrix.columns() == 0);
}<commit_msg>Update init.cpp<commit_after>#include <matrix.hpp>
#include <catch.hpp>
#include <iostream>

using namespace std;

SCENARIO("matrix init", "[init]") {
	Matrix matrix;
	REQUIRE(matrix.rows() == 0);
	REQUIRE(matrix.columns() == 0);
}

SCENARIO("params init", "[init with params]") {
	int init = 5;
	Matrix matrix(init, init);
	REQUIRE(matrix.rows() == 5);
	REQUIRE(matrix.columns() == 5);
}

SCENARIO("copy", "[copy]")
{
	int init = 2;
	Matrix m1(init, init);
	Matrix copy(m1);
	REQUIRE(copy.rows() == 2);
	REQUIRE(copy.columns() == 2);
}

SCENARIO("+", "[+]")
{
	Matrix A(2, 2);
	Matrix B(2, 2);
	Matrix C(2, 2);
	std::ifstream ("f1.txt") >> A;
	std::ifstream ("f2.txt") >> B;
	std::ifstream ("f3.txt") >> C;
	REQUIRE((A + B) == C);
}

SCENARIO("*", "[*]")
{
	Matrix A (2, 2);
	Matrix B (2, 2);
	Matrix C (2, 2);
	std::ifstream("f1.txt") >> A;
	std::ifstream("f2.txt") >> B;
	std::ifstream("f4.txt") >> C;
	REQUIRE((A*B) == C);
}

SCENARIO("=", "[=]")
{
	Matrix A(2, 2);
	Matrix B = A;
	REQUIRE(B == A);
}

SCENARIO("read", "[read]")
{
	Matrix A(2, 2);
	Matrix B (2, 2);
	std::ifstream("f1.txt") >> A;
	std::ofstream("f5.txt") << A;
	std::ifstream("f5.txt") >> B;
	REQUIRE(B == A);
}
{'fraction_non_alphanumeric': 0.25966447848285923, 'fraction_numerical': 0.028446389496717725, 'mean_word_length': 4.669421487603306, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 24, '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': '454712', 'n_tokens_mistral': 634, 'n_tokens_neox': 625, 'n_words': 130}