Hey!
I also worked on the tasks done by Mark Tannous for the Sphere :
1.
https://www.google-melange.com/gci/task/view/google/gci2014/5832406154084352
2.
https://www.google-melange.com/gci/task/view/google/gci2014/5787710711136256

I made a lot of changes in the file and compiled and successfully ran the
tests.
I also made some changes to the Ellipsoid test file (.cpp) submitted by
Andromeda, after the changes that I made yesterday.

*I have a doubt. The file submitted by Andromeda and Mark had a difference
in their licenses. Why so?*

The final "tests/coreInterface/ellipsoid.cpp" and
"tests/coreInterface/sphere.cpp" files are attached. Also the final Test
log is attached.

With Regards,
Kalpit Thakkar
/*                  E L L I P S O I D . C P P
 * BRL-CAD
 *
 * Copyright (c) 2014 United States Government as represented by
 * the U.S. Army Research Laboratory.
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public License
 * version 2.1 as published by the Free Software Foundation.
 *
 * This library 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
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this file; see the file named COPYING for more
 * information.
 */
/** @file ellipsoid.cpp
 *
 * C++ core interface Ellipsoid test
 *
 */

#include <iostream>

#include "brlcad/Ellipsoid.h"

#include "primitives.h"

#include "vmath.h"
#include "bn/tol.h"
#include "raytrace.h"

#define VECTOR3D_EQUAL(a, b) VNEAR_EQUAL(a.coordinates, b.coordinates, BN_TOL_DIST)

#define VECTOR3D_MAGEQUAL(a, b) (NEAR_EQUAL(MAGNITUDE(a.coordinates), b, BN_TOL_DIST))

#define AXIS_ORTHOGONAL(a, b, c)    \
  (NEAR_ZERO(VDOT(a.coordinates, b.coordinates), RT_DOT_TOL) &&    \
  NEAR_ZERO(VDOT(b.coordinates, c.coordinates), RT_DOT_TOL) &&    \
  NEAR_ZERO(VDOT(a.coordinates, c.coordinates), RT_DOT_TOL))

#define ADD_TEST(expression, allTestsPassed)    \
  if (!expression) {    \
  std::cout << "Failed test: " << #expression << std::endl;    \
  allTestsPassed = false;    \
  } else {    \
  std::cout << "Passed test: " << #expression << std::endl;    \
  }


bool testUnitEllipsoidConstructor()
{
  BRLCAD::Ellipsoid ellipsoid;
  BRLCAD::Vector3D semiPrincipalAxisA = ellipsoid.SemiPrincipalAxis(0);
  BRLCAD::Vector3D semiPrincipalAxisB = ellipsoid.SemiPrincipalAxis(1);
  BRLCAD::Vector3D semiPrincipalAxisC = ellipsoid.SemiPrincipalAxis(2);
  return (VECTOR3D_EQUAL(ellipsoid.Center(), BRLCAD::Vector3D()) &&
          VECTOR3D_MAGEQUAL(semiPrincipalAxisA, 1) &&
          VECTOR3D_MAGEQUAL(semiPrincipalAxisB, 1) &&
          VECTOR3D_MAGEQUAL(semiPrincipalAxisC, 1) &&
          AXIS_ORTHOGONAL(semiPrincipalAxisA, semiPrincipalAxisB, semiPrincipalAxisC));
}

bool testGeneralEllipsoidConstructor(BRLCAD::Vector3D center,
			    BRLCAD::Vector3D semiPrincipalAxisA,
			    BRLCAD::Vector3D semiPrincipalAxisB,
			    BRLCAD::Vector3D semiPrincipalAxisC)
{
  BRLCAD::Ellipsoid ellipsoid(center, semiPrincipalAxisA, semiPrincipalAxisB, semiPrincipalAxisC);
  return (VECTOR3D_EQUAL(ellipsoid.Center(), center) &&
          VECTOR3D_EQUAL(ellipsoid.SemiPrincipalAxis(0), semiPrincipalAxisA) &&
          VECTOR3D_EQUAL(ellipsoid.SemiPrincipalAxis(1), semiPrincipalAxisB) &&
          VECTOR3D_EQUAL(ellipsoid.SemiPrincipalAxis(2), semiPrincipalAxisC));
}

bool testBodyOfRevolutionConstructor(BRLCAD::Vector3D center,
				  BRLCAD::Vector3D semiPrincipalAxis,
				  const double radius)
{
  BRLCAD::Ellipsoid ellipsoid(center, semiPrincipalAxis, radius);
  BRLCAD::Vector3D actualSemiPrincipalAxisA = ellipsoid.SemiPrincipalAxis(0);
  BRLCAD::Vector3D actualSemiPrincipalAxisB = ellipsoid.SemiPrincipalAxis(1);
  BRLCAD::Vector3D actualSemiPrincipalAxisC = ellipsoid.SemiPrincipalAxis(2);

  return (VECTOR3D_EQUAL(ellipsoid.Center(), center) &&
          VECTOR3D_EQUAL(actualSemiPrincipalAxisA, semiPrincipalAxis) &&
          VECTOR3D_MAGEQUAL(actualSemiPrincipalAxisB, radius) &&
          VECTOR3D_MAGEQUAL(actualSemiPrincipalAxisC, radius) &&
          AXIS_ORTHOGONAL(actualSemiPrincipalAxisA,
		                      actualSemiPrincipalAxisB,
		                      actualSemiPrincipalAxisC));
}

bool testSphereConstructor(BRLCAD::Vector3D center, const double radius)
{
  BRLCAD::Ellipsoid ellipsoid(center, radius);
  BRLCAD::Vector3D actualSemiPrincipalAxisA = ellipsoid.SemiPrincipalAxis(0);
  BRLCAD::Vector3D actualSemiPrincipalAxisB = ellipsoid.SemiPrincipalAxis(1);
  BRLCAD::Vector3D actualSemiPrincipalAxisC = ellipsoid.SemiPrincipalAxis(2);
  return (VECTOR3D_EQUAL(ellipsoid.Center(), center) &&
          VECTOR3D_MAGEQUAL(actualSemiPrincipalAxisA, radius) &&
          VECTOR3D_MAGEQUAL(actualSemiPrincipalAxisB, radius) &&
          VECTOR3D_MAGEQUAL(actualSemiPrincipalAxisC, radius) &&
          AXIS_ORTHOGONAL(actualSemiPrincipalAxisA,
		                      actualSemiPrincipalAxisB,
		                      actualSemiPrincipalAxisC));
}

bool testSetCenter(BRLCAD::Vector3D center)
{
  BRLCAD::Ellipsoid ellipsoid;
  ellipsoid.SetCenter(center);
  return (VECTOR3D_EQUAL(ellipsoid.Center(), center));
}

bool testSetSemiPrincipalAxis(size_t index, BRLCAD::Vector3D axis)
{
  BRLCAD::Ellipsoid ellipsoid;
  ellipsoid.SetSemiPrincipalAxis(index, axis);
  return (VECTOR3D_EQUAL(ellipsoid.SemiPrincipalAxis(index), axis));
}

bool testGeneralSet(BRLCAD::Vector3D center, BRLCAD::Vector3D semiPrincipalAxisA,
		      BRLCAD::Vector3D semiPrincipalAxisB, BRLCAD::Vector3D semiPrincipalAxisC)
{
  BRLCAD::Ellipsoid ellipsoid;
  ellipsoid.Set(center, semiPrincipalAxisA, semiPrincipalAxisB, semiPrincipalAxisC);
  return (VECTOR3D_EQUAL(ellipsoid.Center(), center) &&
          VECTOR3D_EQUAL(ellipsoid.SemiPrincipalAxis(0), semiPrincipalAxisA) &&
          VECTOR3D_EQUAL(ellipsoid.SemiPrincipalAxis(1), semiPrincipalAxisB) &&
          VECTOR3D_EQUAL(ellipsoid.SemiPrincipalAxis(2), semiPrincipalAxisC));
}

bool testBodyOfRevolutionSet(BRLCAD::Vector3D center,
			    BRLCAD::Vector3D semiPrincipalAxis, const double radius)
{
  BRLCAD::Ellipsoid ellipsoid;
  ellipsoid.Set(center, semiPrincipalAxis, radius);
  BRLCAD::Vector3D actualSemiPrincipalAxisA = ellipsoid.SemiPrincipalAxis(0);
  BRLCAD::Vector3D actualSemiPrincipalAxisB = ellipsoid.SemiPrincipalAxis(1);
  BRLCAD::Vector3D actualSemiPrincipalAxisC = ellipsoid.SemiPrincipalAxis(2);

  return (VECTOR3D_EQUAL(ellipsoid.Center(), center) &&
          VECTOR3D_EQUAL(actualSemiPrincipalAxisA, semiPrincipalAxis) &&
          VECTOR3D_MAGEQUAL(actualSemiPrincipalAxisB, radius) &&
          VECTOR3D_MAGEQUAL(actualSemiPrincipalAxisC, radius) &&
          AXIS_ORTHOGONAL(actualSemiPrincipalAxisA,
		                      actualSemiPrincipalAxisB,
		                      actualSemiPrincipalAxisC));
}

bool testSetFocals(BRLCAD::Vector3D focalA, BRLCAD::Vector3D focalB, const double majorAxisLength)
{
  BRLCAD::Ellipsoid ellipsoid;
  ellipsoid.SetFocals(focalA, focalB, majorAxisLength);
  BRLCAD::Vector3D actualSemiPrincipalAxisA = ellipsoid.SemiPrincipalAxis(0);
  BRLCAD::Vector3D actualSemiPrincipalAxisB = ellipsoid.SemiPrincipalAxis(1);
  BRLCAD::Vector3D actualSemiPrincipalAxisC = ellipsoid.SemiPrincipalAxis(2);

  BRLCAD::Vector3D fociDistance;
  VADD2(fociDistance.coordinates, focalA.coordinates, focalB.coordinates);

  BRLCAD::Vector3D expectedCenter;
  VSCALE(expectedCenter.coordinates, fociDistance.coordinates, 0.5);

  double expectedMinorAxesLengths;
  expectedMinorAxesLengths = sqrt(majorAxisLength * majorAxisLength - MAGSQ(fociDistance.coordinates) * 0.25);

  return (VECTOR3D_EQUAL(ellipsoid.Center(), expectedCenter) &&
          VECTOR3D_MAGEQUAL(actualSemiPrincipalAxisA, majorAxisLength) &&
          VECTOR3D_MAGEQUAL(actualSemiPrincipalAxisB, expectedMinorAxesLengths) &&
          VECTOR3D_MAGEQUAL(actualSemiPrincipalAxisC, expectedMinorAxesLengths) &&
          AXIS_ORTHOGONAL(actualSemiPrincipalAxisA,
		                      actualSemiPrincipalAxisB,
		                      actualSemiPrincipalAxisC));
}

bool testSetSphere(BRLCAD::Vector3D center, const double radius)
{
  BRLCAD::Ellipsoid ellipsoid;
  ellipsoid.SetSphere(center, radius);
  BRLCAD::Vector3D actualSemiPrincipalAxisA = ellipsoid.SemiPrincipalAxis(0);
  BRLCAD::Vector3D actualSemiPrincipalAxisB = ellipsoid.SemiPrincipalAxis(1);
  BRLCAD::Vector3D actualSemiPrincipalAxisC = ellipsoid.SemiPrincipalAxis(2);

  return (VECTOR3D_EQUAL(ellipsoid.Center(), center) &&
          VECTOR3D_MAGEQUAL(actualSemiPrincipalAxisA, radius) &&
          VECTOR3D_MAGEQUAL(actualSemiPrincipalAxisB, radius) &&
          VECTOR3D_MAGEQUAL(actualSemiPrincipalAxisC, radius) &&
          AXIS_ORTHOGONAL(actualSemiPrincipalAxisA,
		                      actualSemiPrincipalAxisB,
		                      actualSemiPrincipalAxisC));
}

bool testClone(BRLCAD::Vector3D center, BRLCAD::Vector3D semiPrincipalAxisA,
	        BRLCAD::Vector3D semiPrincipalAxisB, BRLCAD::Vector3D semiPrincipalAxisC)
{
  BRLCAD::Ellipsoid original(center, semiPrincipalAxisA, semiPrincipalAxisB, semiPrincipalAxisC);
  BRLCAD::Ellipsoid cloned = *static_cast<BRLCAD::Ellipsoid*>(original.Clone());
  return (VECTOR3D_EQUAL(cloned.Center(), center) &&
          VECTOR3D_EQUAL(cloned.SemiPrincipalAxis(0), semiPrincipalAxisA) &&
          VECTOR3D_EQUAL(cloned.SemiPrincipalAxis(1), semiPrincipalAxisB) &&
          VECTOR3D_EQUAL(cloned.SemiPrincipalAxis(2), semiPrincipalAxisC));
}

void test_ellipsoid(BRLCAD::Database& database)
{
  BRLCAD::Ellipsoid ellipsoid;
  ellipsoid.SetName("Ellipsoid.s");

  bool allEllipsoidTestsPassed = true;

  if (ellipsoid.IsValid()) {
  std::cout << "Starting Ellipsoid Unit testing . . ." << std::endl;
	ADD_TEST(testUnitEllipsoidConstructor(), allEllipsoidTestsPassed);
	ADD_TEST(testGeneralEllipsoidConstructor(BRLCAD::Vector3D(0, 0, 0), 
    BRLCAD::Vector3D(2, 0, 0), BRLCAD::Vector3D(0, 3, 0), BRLCAD::Vector3D(4, 2, 3)), allEllipsoidTestsPassed);
	ADD_TEST(testBodyOfRevolutionConstructor(BRLCAD::Vector3D(0, 0, 0), 
    BRLCAD::Vector3D(2, 0, 0), 5), allEllipsoidTestsPassed);
	ADD_TEST(testSphereConstructor(BRLCAD::Vector3D(0, 0, 0), 5), allEllipsoidTestsPassed);
	ADD_TEST(testSetCenter(BRLCAD::Vector3D(0, 0, 0)), allEllipsoidTestsPassed);
	ADD_TEST(testSetSemiPrincipalAxis(0, BRLCAD::Vector3D(2, 0, 0)), allEllipsoidTestsPassed);
	ADD_TEST(testSetSemiPrincipalAxis(1, BRLCAD::Vector3D(0, 3, 0)), allEllipsoidTestsPassed);
	ADD_TEST(testSetSemiPrincipalAxis(2, BRLCAD::Vector3D(4, 2, 3)), allEllipsoidTestsPassed);
	ADD_TEST(testGeneralSet(BRLCAD::Vector3D(0, 0, 0), BRLCAD::Vector3D(2, 0, 0),
    BRLCAD::Vector3D(0, 3, 0), BRLCAD::Vector3D(4, 2, 3)), allEllipsoidTestsPassed);
	ADD_TEST(testBodyOfRevolutionSet(BRLCAD::Vector3D(0, 0, 0), 
    BRLCAD::Vector3D(2, 0, 0), 5), allEllipsoidTestsPassed);
	ADD_TEST(testSetFocals(BRLCAD::Vector3D(-1, 0, 0), 
    BRLCAD::Vector3D(0, 1, 0), 10), allEllipsoidTestsPassed);
	ADD_TEST(testSetSphere(BRLCAD::Vector3D(0, 0, 0), 5), allEllipsoidTestsPassed);
	ADD_TEST(testClone(BRLCAD::Vector3D(0, 0, 0), BRLCAD::Vector3D(2, 0, 0),
    BRLCAD::Vector3D(0, 3, 0), BRLCAD::Vector3D(4, 2, 3)), allEllipsoidTestsPassed);
  } else {
  std::cout << "default Ellipsoid not valid" << std::endl;
  allEllipsoidTestsPassed = false;
  }

  if(allEllipsoidTestsPassed) {
  std::cout << "All Ellipsoid tests passed; adding object to database . . ." << std::endl;
  database.Add(ellipsoid);
  }
}

/*
/* Local Variables:
/* mode: C++
/* tab-width: 2
/* c-basic-offset: 2
/* indent-tabs-mode: t
/* End:
/* ex: shiftwidth=2 tabstop=8
 */
/*                S P H E R E . C P P
* BRL-CAD
*
* Copyright (c) 2014 United States Government as represented by
* the U.S. Army Research Laboratory.
*
* This file is in the public domain.
*
*                        DISCLAIMER OF LIABILITY
*
* THIS FILE WAS CAREFULLY TESTED BY THE AUTHOR AND IS MADE AVAILABLE TO YOU
* FREE-OF-CHARGE IN A HIGH-GRADE ACTUAL STATUS. REFERENCE IS MADE HEREWITH TO
* THE FACT THAT IT IS NOT POSSIBLE TO DEVELOP SOFTWARE PROGRAMS SO THAT THEY
* ARE ERROR-FREE FOR ALL APPLICATION CONDITIONS. AS THE FILE IS LICENSED FREE
* OF CHARGE THERE IS NO WARRANTY FOR IT, INSOFAR AS SUCH WARRANTY IS NOT A
* MANDATORY REQUIREMENT OF THE APPLICABLE LAW, SUCH AS IN CASE OF WILFUL ACTS.
* IN ADDITION THERE IS NO LIABILITY ALSO INSOFAR AS SUCH LIABILITY IS NOT A
* MANDATORY REQUIREMENT OF THE APPLICABLE LAW, SUCH AS IN CASE OF WILFUL ACTS.
*
* YOU DECLARE YOU ARE IN AGREEMENT WITH THE USE OF THIS FILE UNDER THE
* ABOVE-LISTED USAGE CONDITIONS AND THE EXCLUSION OF A GUARANTEE AND OF
* LIABILITY. SHOULD INDIVIDUAL PROVISIONS IN THESE CONDITIONS BE IN FULL OR IN
* PART VOID, INVALID OR CONTESTABLE, THE VALIDITY OF ALL OTHER PROVISIONS OR
* AGREEMENTS ARE UNAFFECTED BY THIS. FURTHER THE PARTIES UNDERTAKE AT THIS
* JUNCTURE TO AGREE A LEGALLY VALID REPLACEMENT CLAUSE WHICH MOST CLOSELY
* APPROXIMATES THE ECONOMIC OBJECTIVES.
*/
/** @file Sphere.cpp
 *
 * C++ core interface Sphere test
 *
 */

#include <iostream>
#include <string>
#include <brlcad/Sphere.h>
#include "primitives.h"
#include "bn.h"

using namespace BRLCAD;

#define ADD_TEST(expression, allTestsPassed)    \
  if (!expression) {    \
  std::cout << "Failed test: " << #expression << std::endl;    \
  allTestsPassed = false;    \
  } else {    \
  std::cout << "Passed test: " << #expression << std::endl;    \
  }

/* Tests Sphere's Center function */
bool testSphereCenter(const BRLCAD::Sphere &sphere, 
				const double expectedX, 
				const double expectedY, 
				const double expectedZ)
{
	const BRLCAD::Vector3D center = sphere.Center();
	return(EQUAL(center.coordinates[0], expectedX) &&
	    	 EQUAL(center.coordinates[1], expectedY) &&
	    	 EQUAL(center.coordinates[2], expectedZ));
}

/* Tests Sphere's ClassName function */
bool testSphereClassName(const BRLCAD::Sphere &sphere) 
{
	const std::string name = "Sphere";
	const std::string actualName = sphere.ClassName();
	return(actualName.compare(name) == 0);
}

/* Tests Sphere's Type function */
bool testSphereType(const BRLCAD::Sphere &sphere)
{
	return(sphere.Type() == sphere.ClassName());
}

/* Tests Sphere's IsValid function */
bool testSphereIsValid(const BRLCAD::Sphere &sphere) 
{
	return(sphere.IsValid());
}

/* Tests Sphere's SphereRadius function */
bool testSphereRadius(const BRLCAD::Sphere &sphere, const double expectedRadius)
{
	return(EQUAL(sphere.Radius(), expectedRadius));
}

/* Tests Sphere's Clone function */
bool testSphereClone(BRLCAD::Sphere sphere) 
{
	BRLCAD::Sphere sphere2;
	sphere2 = *static_cast<BRLCAD::Sphere*>(sphere.Clone());
	const BRLCAD::Vector3D center = sphere.Center();
	const BRLCAD::Vector3D center2 = sphere2.Center();
	return(EQUAL(center2.coordinates[0], center.coordinates[0]) &&
		     EQUAL(center2.coordinates[1], center.coordinates[1]) &&
         EQUAL(center2.coordinates[2], center.coordinates[2]) &&
         EQUAL(sphere2.Radius(), sphere.Radius()));
}

/* Tests Sphere's Set function */
bool testSphereSet() 
{
	BRLCAD::Sphere sphere;
	sphere.Set(Vector3D(1.0, 1.0, 1.0), 3.0);
	return(EQUAL(sphere.Center().coordinates[0], 1.0) &&
		     EQUAL(sphere.Center().coordinates[1], 1.0) &&
		     EQUAL(sphere.Center().coordinates[0], 1.0) &&
		     EQUAL(sphere.Radius(), 3.0));
}

/* Tests Sphere's SetCenter function */
bool testSphereSetCenter(const Vector3D &coords)
{
	BRLCAD::Sphere sphere;
	sphere.SetCenter(coords);
	const Vector3D center = sphere.Center();
	return(EQUAL(center.coordinates[0], coords.coordinates[0]) &&
	       EQUAL(center.coordinates[1], coords.coordinates[1]) &&
	       EQUAL(center.coordinates[2], coords.coordinates[2]));
}

/* Tests Sphere's SetRadius function */
bool testSphereSetRadius(const double expectedRadius)
{
	BRLCAD::Sphere sphere;
	sphere.SetRadius(expectedRadius);
	return(EQUAL(sphere.Radius(), expectedRadius));
}

/* Tests Sphere's Copy constructor */
bool testSphereCopy(const BRLCAD::Sphere &sphere)
{
	BRLCAD::Sphere sphere2(sphere);
	const Vector3D center = sphere.Center();
	const Vector3D center2 = sphere2.Center();
	return(sphere2.IsValid() &&
		     EQUAL(center2.coordinates[0], center.coordinates[0]) &&
		     EQUAL(center2.coordinates[1], center.coordinates[1]) &&
		     EQUAL(center2.coordinates[2], center.coordinates[2]) &&
		     EQUAL(sphere2.Radius(), sphere.Radius()));
}

/* Tests Sphere's default(unit) constructor */
bool testUnitSphereConstructor()
{
	BRLCAD::Sphere sphere;
	const Vector3D center = sphere.Center();
	return(EQUAL(center.coordinates[0], 0.0) &&
				 EQUAL(center.coordinates[1], 0.0) &&
				 EQUAL(center.coordinates[2], 0.0) &&
				 EQUAL(sphere.Radius(), 1.0));
}

/* Tests Sphere's general constructor */
bool testGeneralSphereConstructor(const Vector3D &center, const double radius)
{
	BRLCAD::Sphere sphere = BRLCAD::Sphere(center, radius);
	const Vector3D newCenter = sphere.Center();
	return(sphere.IsValid() &&
				 EQUAL(newCenter.coordinates[0], center.coordinates[0]) &&
				 EQUAL(newCenter.coordinates[1], center.coordinates[1]) &&
				 EQUAL(newCenter.coordinates[2], center.coordinates[2]) &&
				 EQUAL(sphere.Radius(), radius));
}

/* We now run all the tests */
void test_sphere(BRLCAD::Database& database)
{	

	/* Initialize a Sphere to test on */
	BRLCAD::Sphere sphere;
	const Vector3D center = Vector3D(1.0, 1.0, 1.0);
	sphere.SetCenter(center);
	sphere.SetRadius(3.0);

	bool allSphereTestsPassed = true;

	/* Runs all the tests */
	if(testSphereIsValid(sphere)) {
	std::cout << "Starting Sphere Unit testing . . ." << std::endl;
	ADD_TEST(testSphereCenter(sphere, 1.0, 1.0, 1.0), allSphereTestsPassed);
	ADD_TEST(testSphereRadius(sphere, 3.0), allSphereTestsPassed);
	ADD_TEST(testSphereClassName(sphere), allSphereTestsPassed);
	ADD_TEST(testSphereType(sphere), allSphereTestsPassed);
	ADD_TEST(testSphereSet(), allSphereTestsPassed);
	ADD_TEST(testSphereSetCenter(center), allSphereTestsPassed);
	ADD_TEST(testSphereSetRadius(3.0), allSphereTestsPassed);
	ADD_TEST(testSphereClone(sphere), allSphereTestsPassed);
	ADD_TEST(testSphereCopy(sphere), allSphereTestsPassed);
	ADD_TEST(testUnitSphereConstructor(), allSphereTestsPassed);
	ADD_TEST(testGeneralSphereConstructor(sphere.Center(), sphere.Radius()), allSphereTestsPassed);
	} else {
	std::cout << "Default Sphere is not valid" << std::endl;
	allSphereTestsPassed = false;
	}

	/* We only add the sphere to the database if it failed no tests */
	if(allSphereTestsPassed) {
  std::cout << "All Sphere tests passed; adding object to database . . ." << std::endl;
  database.Add(sphere);
  }
}

/*
/* Local Variables:
/* mode: C++
/* tab-width: 2
/* c-basic-offset: 2
/* indent-tabs-mode: t
/* End:
/* ex: shiftwidth=2 tabstop=8
 */
Start testing: Mar 12 21:16 IST
----------------------------------------------------------
1/1 Testing: tester_ci_primitives_01
1/1 Test: tester_ci_primitives_01
Command: "/home/dracarys/GSoC/brlcad_dev/build_x86/tests-bin/tester_ci_primitives" "test.g"
Directory: /home/dracarys/GSoC/brlcad_dev/build_x86/tests/coreInterface
"tester_ci_primitives_01" start time: Mar 12 21:16 IST
Output:
----------------------------------------------------------
Starting Ellipsoid Unit testing . . .
Passed test: testUnitEllipsoidConstructor()
Passed test: testGeneralEllipsoidConstructor(BRLCAD::Vector3D(0, 0, 0), BRLCAD::Vector3D(2, 0, 0), BRLCAD::Vector3D(0, 3, 0), BRLCAD::Vector3D(4, 2, 3))
Passed test: testBodyOfRevolutionConstructor(BRLCAD::Vector3D(0, 0, 0), BRLCAD::Vector3D(2, 0, 0), 5)
Passed test: testSphereConstructor(BRLCAD::Vector3D(0, 0, 0), 5)
Passed test: testSetCenter(BRLCAD::Vector3D(0, 0, 0))
Passed test: testSetSemiPrincipalAxis(0, BRLCAD::Vector3D(2, 0, 0))
Passed test: testSetSemiPrincipalAxis(1, BRLCAD::Vector3D(0, 3, 0))
Passed test: testSetSemiPrincipalAxis(2, BRLCAD::Vector3D(4, 2, 3))
Passed test: testGeneralSet(BRLCAD::Vector3D(0, 0, 0), BRLCAD::Vector3D(2, 0, 0), BRLCAD::Vector3D(0, 3, 0), BRLCAD::Vector3D(4, 2, 3))
Passed test: testBodyOfRevolutionSet(BRLCAD::Vector3D(0, 0, 0), BRLCAD::Vector3D(2, 0, 0), 5)
Passed test: testSetFocals(BRLCAD::Vector3D(-1, 0, 0), BRLCAD::Vector3D(0, 1, 0), 10)
Passed test: testSetSphere(BRLCAD::Vector3D(0, 0, 0), 5)
Passed test: testClone(BRLCAD::Vector3D(0, 0, 0), BRLCAD::Vector3D(2, 0, 0), BRLCAD::Vector3D(0, 3, 0), BRLCAD::Vector3D(4, 2, 3))
All Ellipsoid tests passed; adding object to database . . .
Starting Sphere Unit testing . . .
Passed test: testSphereCenter(sphere, 1.0, 1.0, 1.0)
Passed test: testSphereRadius(sphere, 3.0)
Passed test: testSphereClassName(sphere)
Passed test: testSphereType(sphere)
Passed test: testSphereSet()
Passed test: testSphereSetCenter(center)
Passed test: testSphereSetRadius(3.0)
Passed test: testSphereClone(sphere)
Passed test: testSphereCopy(sphere)
Passed test: testUnitSphereConstructor()
Passed test: testGeneralSphereConstructor(sphere.Center(), sphere.Radius())
All Sphere tests passed; adding object to database . . .
<end of output>
Test time =   0.01 sec
----------------------------------------------------------
Test Passed.
"tester_ci_primitives_01" end time: Mar 12 21:16 IST
"tester_ci_primitives_01" time elapsed: 00:00:00
----------------------------------------------------------

End testing: Mar 12 21:16 IST
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
BRL-CAD Developer mailing list
brlcad-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-devel

Reply via email to