// =====================================================================================================================
//  fennec-test, a program to execute unit tests for fennec
//  Copyright © 2025 - 2026  Medusa Slockbower
//
//  This program is free software: you can redistribute it and/or modify
//  it under the terms of the GNU General Public License as published by
//  the Free Software Foundation, either version 3 of the License, or
//  (at your option) any later version.
//
//  This program is distributed in the hope that it will be useful,
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//  GNU General Public License for more details.
//
//  You should have received a copy of the GNU General Public License
//  along with this program.  If not, see <https://www.gnu.org/licenses/>.
// =====================================================================================================================


#ifndef FENNEC_TEST_SCALAR_H
#define FENNEC_TEST_SCALAR_H

#include <fennec/math/vector_traits.h>

#include "../../test.h"

namespace fennec::test
{

	inline void fennec_test_math_scalar()
	{
		fennec_test_section("component_count");

		fennec_test_spacer(1);

		fennec_test_run((component_count_v<bool_t>   == 1), true);
		fennec_test_run((component_count_v<int_t>    == 1), true);
		fennec_test_run((component_count_v<uint_t>   == 1), true);
		fennec_test_run((component_count_v<float_t>  == 1), true);
		fennec_test_run((component_count_v<double_t> == 1), true);

		fennec_test_spacer(1);

		fennec_test_run((component_count_v<const bool_t>   == 1), true);
		fennec_test_run((component_count_v<const int_t>    == 1), true);
		fennec_test_run((component_count_v<const uint_t>   == 1), true);
		fennec_test_run((component_count_v<const float_t>  == 1), true);
		fennec_test_run((component_count_v<const double_t> == 1), true);

		fennec_test_spacer(1);

		fennec_test_run((component_count_v<volatile bool_t>   == 1), true);
		fennec_test_run((component_count_v<volatile int_t>    == 1), true);
		fennec_test_run((component_count_v<volatile uint_t>   == 1), true);
		fennec_test_run((component_count_v<volatile float_t>  == 1), true);
		fennec_test_run((component_count_v<volatile double_t> == 1), true);

		fennec_test_spacer(1);

		fennec_test_run((component_count_v<const volatile bool_t>   == 1), true);
		fennec_test_run((component_count_v<const volatile int_t>    == 1), true);
		fennec_test_run((component_count_v<const volatile uint_t>   == 1), true);
		fennec_test_run((component_count_v<const volatile float_t>  == 1), true);
		fennec_test_run((component_count_v<const volatile double_t> == 1), true);
	}

}

#endif // FENNEC_TEST_SCALAR_H
