<commit_before>// $Id: Circle3_test.C,v 1.6 2001/07/15 17:32:38 amoll Exp $
#include <BALL/CONCEPT/classTest.h>

///////////////////////////

#	include <BALL/MATHS/circle3.h>
#	include <BALL/MATHS/vector3.h>

///////////////////////////

START_TEST(Circle3, "$Id: Circle3_test.C,v 1.6 2001/07/15 17:32:38 amoll Exp $")

/////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////

using namespace BALL;
using namespace std;

String filename;
using std::ofstream;
using std::ios;

CHECK(TCircle3::BALL_CREATE(TCircle3<T>))
	Vector3 v1(1.0, 2.0, 3.0), v2(1.0, 2.0, 3.0);
	Vector3 v0;
	Circle3 c(v1, v2, 5);
	Circle3* c_ptr = (Circle3*)c.create(false, true);
	TEST_EQUAL(c_ptr->p == v0, true)
	TEST_EQUAL(c_ptr->n == v0, true)
	delete c_ptr;
	c_ptr = (Circle3*)c.create();
	TEST_EQUAL(c_ptr->p == v1, true)
	TEST_EQUAL(c_ptr->n == v2, true)
	TEST_EQUAL(c_ptr->radius == 5.0, true)
	delete c_ptr;
RESULT

CHECK(TCircle3::TCircle3())
  Circle3* c;
	c = new Circle3();
	TEST_NOT_EQUAL(c, 0)
RESULT

CHECK(~TCircle();)
  Circle3* c;
	c = new Circle3();
	delete c;
RESULT	

Circle3 c, c2;
Vector3 p = Vector3(1.0, 2.0, 3.0),
				n = Vector3(4.0, 5.0, 6.0),
				v1, v2, v3;
				
float radian = 7.0;

//also test for TCircle3::get(TVector3<T>& point, TVector3<T>& normal, T& radius) const
CHECK(TCircle3::TCircle3(const TVector3<T>& point, const TVector3<T>& normal, const T& radius))
	c = Circle3(p, n, radian);
	float radian2;
	c.get(v1, v2, radian2);
	TEST_EQUAL(v1, p)
	TEST_EQUAL(v2, n)
	TEST_EQUAL(radian, radian2)
RESULT

CHECK(TCircle3::bool operator == (const TCircle3& circle) const )
	c = Circle3(p, n, radian);
	c2 = Circle3(p, n, radian);
	TEST_EQUAL(c == c2, true)
RESULT

CHECK(TCircle3::TCircle3(const TCircle3& circle, bool /* deep */ = true))
	c = Circle3(p, n, radian);
	c2 = Circle3(c);
	TEST_EQUAL(c == c2, true)
RESULT

CHECK(TCircle3::void swap(TCircle3& circle))
	c = Circle3(p, n, radian);
	v1 = Vector3(3.0, 4.0, 5.0);
	v2 = Vector3(6.0, 7.0, 8.0);
	c2 = Circle3(v1, v2, 12);
	Circle3 cc = c, cc2 = c2;
	c2.swap(c);
	TEST_EQUAL(c == cc2, true)
	TEST_EQUAL(c2 == cc, true)
RESULT

CHECK(TCircle3::void set(const TCircle3& circle, bool /* deep */ = true))
	c = Circle3(p, n, radian);
	v1 = Vector3(3.0, 4.0, 5.0);
	v2 = Vector3(6.0, 7.0, 8.0);
	c2 = Circle3(v1, v2, 212.0);
	c2.set(c);
	TEST_EQUAL(c == c2, true)
RESULT

CHECK(TCircle3::void set(const TVector3<T>& point, const TVector3<T>& normal, const T& radius))
	c = Circle3(p, n, radian);
	v1 = Vector3(3.0, 4.0, 5.0);
	v2 = Vector3(6.0, 7.0, 8.0);
	c2 = Circle3(v1, v2, 212.0);
	c = Circle3(v1, v2, 212.0);
	TEST_EQUAL(c == c2, true)
RESULT

CHECK(TCircle3::void get(TCircle3& circle, bool /* deep */ = true) const)
	c = Circle3(p, n, radian);
	v1 = Vector3(3.0, 4.0, 5.0);
	v2 = Vector3(6.0, 7.0, 8.0);
	c2 = Circle3(v1, v2, 212.0);
	c2.get(c);
	TEST_EQUAL(c == c2, true)
RESULT

CHECK(TCircle3::isValid() const )
	c = Circle3(v1, v2, 123.0);
	TEST_EQUAL(c.isValid(), true)
RESULT

CHECK(bool operator != (const TCircle3& circle) const )
	c = Circle3(p, n, radian);
	c2 = Circle3(22.2, n, radian);
	TEST_EQUAL(c != c2, true)<commit_msg>fixed: adapted to new "explicit" declaration of TVector3<T>::TVector3(const T&)<commit_after>// $Id: Circle3_test.C,v 1.7 2001/07/15 21:05:00 oliver Exp $
#include <BALL/CONCEPT/classTest.h>

///////////////////////////

#	include <BALL/MATHS/circle3.h>
#	include <BALL/MATHS/vector3.h>

///////////////////////////

START_TEST(Circle3, "$Id: Circle3_test.C,v 1.7 2001/07/15 21:05:00 oliver Exp $")

/////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////

using namespace BALL;
using namespace std;

String filename;
using std::ofstream;
using std::ios;

CHECK(TCircle3::BALL_CREATE(TCircle3<T>))
	Vector3 v1(1.0, 2.0, 3.0), v2(1.0, 2.0, 3.0);
	Vector3 v0;
	Circle3 c(v1, v2, 5);
	Circle3* c_ptr = (Circle3*)c.create(false, true);
	TEST_EQUAL(c_ptr->p == v0, true)
	TEST_EQUAL(c_ptr->n == v0, true)
	delete c_ptr;
	c_ptr = (Circle3*)c.create();
	TEST_EQUAL(c_ptr->p == v1, true)
	TEST_EQUAL(c_ptr->n == v2, true)
	TEST_EQUAL(c_ptr->radius == 5.0, true)
	delete c_ptr;
RESULT

CHECK(TCircle3::TCircle3())
  Circle3* c;
	c = new Circle3();
	TEST_NOT_EQUAL(c, 0)
RESULT

CHECK(~TCircle();)
  Circle3* c;
	c = new Circle3();
	delete c;
RESULT	

Circle3 c, c2;
Vector3 p = Vector3(1.0, 2.0, 3.0),
				n = Vector3(4.0, 5.0, 6.0),
				v1, v2, v3;
				
float radian = 7.0;

//also test for TCircle3::get(TVector3<T>& point, TVector3<T>& normal, T& radius) const
CHECK(TCircle3::TCircle3(const TVector3<T>& point, const TVector3<T>& normal, const T& radius))
	c = Circle3(p, n, radian);
	float radian2;
	c.get(v1, v2, radian2);
	TEST_EQUAL(v1, p)
	TEST_EQUAL(v2, n)
	TEST_EQUAL(radian, radian2)
RESULT

CHECK(TCircle3::bool operator == (const TCircle3& circle) const )
	c = Circle3(p, n, radian);
	c2 = Circle3(p, n, radian);
	TEST_EQUAL(c == c2, true)
RESULT

CHECK(TCircle3::TCircle3(const TCircle3& circle, bool /* deep */ = true))
	c = Circle3(p, n, radian);
	c2 = Circle3(c);
	TEST_EQUAL(c == c2, true)
RESULT

CHECK(TCircle3::void swap(TCircle3& circle))
	c = Circle3(p, n, radian);
	v1 = Vector3(3.0, 4.0, 5.0);
	v2 = Vector3(6.0, 7.0, 8.0);
	c2 = Circle3(v1, v2, 12);
	Circle3 cc = c, cc2 = c2;
	c2.swap(c);
	TEST_EQUAL(c == cc2, true)
	TEST_EQUAL(c2 == cc, true)
RESULT

CHECK(TCircle3::void set(const TCircle3& circle, bool /* deep */ = true))
	c = Circle3(p, n, radian);
	v1 = Vector3(3.0, 4.0, 5.0);
	v2 = Vector3(6.0, 7.0, 8.0);
	c2 = Circle3(v1, v2, 212.0);
	c2.set(c);
	TEST_EQUAL(c == c2, true)
RESULT

CHECK(TCircle3::void set(const TVector3<T>& point, const TVector3<T>& normal, const T& radius))
	c = Circle3(p, n, radian);
	v1 = Vector3(3.0, 4.0, 5.0);
	v2 = Vector3(6.0, 7.0, 8.0);
	c2 = Circle3(v1, v2, 212.0);
	c = Circle3(v1, v2, 212.0);
	TEST_EQUAL(c == c2, true)
RESULT

CHECK(TCircle3::void get(TCircle3& circle, bool /* deep */ = true) const)
	c = Circle3(p, n, radian);
	v1 = Vector3(3.0, 4.0, 5.0);
	v2 = Vector3(6.0, 7.0, 8.0);
	c2 = Circle3(v1, v2, 212.0);
	c2.get(c);
	TEST_EQUAL(c == c2, true)
RESULT

CHECK(TCircle3::isValid() const )
	c = Circle3(v1, v2, 123.0);
	TEST_EQUAL(c.isValid(), true)
RESULT

CHECK(bool operator != (const TCircle3& circle) const )
	c = Circle3(p, n, radian);
	c2 = Circle3(Vector3(22.2), n, radian);
	TEST_EQUAL(c != c2, true)
{'fraction_non_alphanumeric': 0.23298551627472355, 'fraction_numerical': 0.08363183304781187, 'mean_word_length': 3.2501654533421576, 'pattern_counts': {'":': 0, '<': 24, '<?xml version=': 0, '>': 34, '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': '6244154', 'n_tokens_mistral': 3070, 'n_tokens_neox': 2915, 'n_words': 661}