[FEAT] Rename the test names
This commit is contained in:
@@ -35,7 +35,7 @@ using namespace Raytracer;
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
TEST_CASE("[Tuple] a tuple with w=1.0 is a point", "[Tuple]")
|
||||
TEST_CASE("[01][Tuple] a tuple with w=1.0 is a point", "[Tuple]")
|
||||
{
|
||||
Tuple a(4.3, -4.2, 3.1, 1.0);
|
||||
|
||||
@@ -50,7 +50,7 @@ TEST_CASE("[Tuple] a tuple with w=1.0 is a point", "[Tuple]")
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
TEST_CASE("[Tuple] a tuple with w=0 is a vector", "[Tuple]")
|
||||
TEST_CASE("[01][Tuple] a tuple with w=0 is a vector", "[Tuple]")
|
||||
{
|
||||
Tuple a(4.3, -4.2, 3.1, 0.0);
|
||||
|
||||
@@ -64,7 +64,7 @@ TEST_CASE("[Tuple] a tuple with w=0 is a vector", "[Tuple]")
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
TEST_CASE("[Tuple] access of data with []", "[Tuple]")
|
||||
TEST_CASE("[01][Tuple] access of data with []", "[Tuple]")
|
||||
{
|
||||
Tuple a(4.3, -4.2, 3.1, 0.0);
|
||||
|
||||
@@ -76,7 +76,7 @@ TEST_CASE("[Tuple] access of data with []", "[Tuple]")
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
TEST_CASE("[Tuple] constructor with std::vector", "[Tuple]")
|
||||
TEST_CASE("[01][Tuple] constructor with std::vector", "[Tuple]")
|
||||
{
|
||||
std::vector<double> v = {4.3, -4.2, 3.1, 0.0};
|
||||
Tuple a(v);
|
||||
@@ -89,7 +89,7 @@ TEST_CASE("[Tuple] constructor with std::vector", "[Tuple]")
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
TEST_CASE("[Tuple] test copy constructor", "[Tuple]")
|
||||
TEST_CASE("[01][Tuple] test copy constructor", "[Tuple]")
|
||||
{
|
||||
Tuple a;
|
||||
Tuple b(4.3, -4.2, 3.1, 0.0);
|
||||
@@ -104,7 +104,7 @@ TEST_CASE("[Tuple] test copy constructor", "[Tuple]")
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
TEST_CASE("[Tuple] Tuple could be copy", "[Tuple]")
|
||||
TEST_CASE("[01][Tuple] Tuple could be copy", "[Tuple]")
|
||||
{
|
||||
Tuple p = Tuple::Point(4, -4, 3);
|
||||
Tuple n;
|
||||
@@ -116,7 +116,7 @@ TEST_CASE("[Tuple] Tuple could be copy", "[Tuple]")
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
TEST_CASE("[Tuple] Point() creates tuples with w=1", "[Tuple][Point]")
|
||||
TEST_CASE("[01][Tuple] Point() creates tuples with w=1", "[Tuple][Point]")
|
||||
{
|
||||
Tuple p = Tuple::Point(4, -4, 3);
|
||||
|
||||
@@ -125,7 +125,7 @@ TEST_CASE("[Tuple] Point() creates tuples with w=1", "[Tuple][Point]")
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
TEST_CASE("[Tuple] Vector() creates tuples with w=0", "[Tuple][Vector]")
|
||||
TEST_CASE("[01][Tuple] Vector() creates tuples with w=0", "[Tuple][Vector]")
|
||||
{
|
||||
Tuple v = Tuple::Vector(4, -4, 3);
|
||||
|
||||
@@ -134,7 +134,7 @@ TEST_CASE("[Tuple] Vector() creates tuples with w=0", "[Tuple][Vector]")
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
TEST_CASE("[Tuple] Adding two tuples", "[Tuple][Operations]")
|
||||
TEST_CASE("[01][Tuple] Adding two tuples", "[Tuple][Operations]")
|
||||
{
|
||||
Tuple a1(3, -2, 5, 1);
|
||||
Tuple a2(-2, 3, 1, 0);
|
||||
@@ -144,7 +144,7 @@ TEST_CASE("[Tuple] Adding two tuples", "[Tuple][Operations]")
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
TEST_CASE("[Tuple] Adding two tuples without modify a1", "[Tuple][Operations]")
|
||||
TEST_CASE("[01][Tuple] Adding two tuples without modify a1", "[Tuple][Operations]")
|
||||
{
|
||||
Tuple a1(3, -2, 5, 1);
|
||||
Tuple a2(-2, 3, 1, 0);
|
||||
@@ -156,7 +156,7 @@ TEST_CASE("[Tuple] Adding two tuples without modify a1", "[Tuple][Operations]")
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
TEST_CASE("[Tuple] Subtracting two points", "[Tuple][Operations]")
|
||||
TEST_CASE("[01][Tuple] Subtracting two points", "[Tuple][Operations]")
|
||||
{
|
||||
Tuple p1 = Tuple::Point(3, 2, 1);
|
||||
Tuple p2 = Tuple::Point(5, 6, 7);
|
||||
@@ -166,7 +166,7 @@ TEST_CASE("[Tuple] Subtracting two points", "[Tuple][Operations]")
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
TEST_CASE("[Tuple] Subtracting two points without modify p1", "[Tuple][Operations]")
|
||||
TEST_CASE("[01][Tuple] Subtracting two points without modify p1", "[Tuple][Operations]")
|
||||
{
|
||||
Tuple p1 = Tuple::Point(3, 2, 1);
|
||||
Tuple p2 = Tuple::Point(5, 6, 7);
|
||||
@@ -178,7 +178,7 @@ TEST_CASE("[Tuple] Subtracting two points without modify p1", "[Tuple][Operation
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
TEST_CASE("[Tuple] Subtracting a vector from a point", "[Tuple][Operations]")
|
||||
TEST_CASE("[01][Tuple] Subtracting a vector from a point", "[Tuple][Operations]")
|
||||
{
|
||||
Tuple p = Tuple::Point(3, 2, 1);
|
||||
Tuple v = Tuple::Vector(5, 6, 7);
|
||||
@@ -188,7 +188,7 @@ TEST_CASE("[Tuple] Subtracting a vector from a point", "[Tuple][Operations]")
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
TEST_CASE("[Tuple] Subtracting two vectors", "[Tuple][Operations]")
|
||||
TEST_CASE("[01][Tuple] Subtracting two vectors", "[Tuple][Operations]")
|
||||
{
|
||||
Tuple v1 = Tuple::Vector(3, 2, 1);
|
||||
Tuple v2 = Tuple::Vector(5, 6, 7);
|
||||
@@ -198,7 +198,7 @@ TEST_CASE("[Tuple] Subtracting two vectors", "[Tuple][Operations]")
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
TEST_CASE("[Tuple] Subtracting a vector from the zero vector", "[Tuple][Operations]")
|
||||
TEST_CASE("[01][Tuple] Subtracting a vector from the zero vector", "[Tuple][Operations]")
|
||||
{
|
||||
Tuple zero = Tuple::Vector(0, 0, 0);
|
||||
Tuple v = Tuple::Vector(1, -2, 3);
|
||||
@@ -208,7 +208,7 @@ TEST_CASE("[Tuple] Subtracting a vector from the zero vector", "[Tuple][Operatio
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
TEST_CASE("[Tuple] Negative a tuple", "[Tuple][Operations]")
|
||||
TEST_CASE("[01][Tuple] Negative a tuple", "[Tuple][Operations]")
|
||||
{
|
||||
Tuple a(1, -2, 3, -4);
|
||||
|
||||
@@ -217,7 +217,7 @@ TEST_CASE("[Tuple] Negative a tuple", "[Tuple][Operations]")
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
TEST_CASE("[Tuple] Multiplying a tuple by a scalar", "[Tuple][Multiplication]")
|
||||
TEST_CASE("[01][Tuple] Multiplying a tuple by a scalar", "[Tuple][Multiplication]")
|
||||
{
|
||||
Tuple a(1, -2, 3, -4);
|
||||
|
||||
@@ -226,7 +226,7 @@ TEST_CASE("[Tuple] Multiplying a tuple by a scalar", "[Tuple][Multiplication]")
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
TEST_CASE("[Tuple] Multiplying a tuple by a scalar without modify a", "[Tuple][Multiplication]")
|
||||
TEST_CASE("[01][Tuple] Multiplying a tuple by a scalar without modify a", "[Tuple][Multiplication]")
|
||||
{
|
||||
Tuple a(1, -2, 3, -4);
|
||||
|
||||
@@ -237,7 +237,7 @@ TEST_CASE("[Tuple] Multiplying a tuple by a scalar without modify a", "[Tuple][M
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
TEST_CASE("[Tuple] Dividing a tuple by a scalar", "[Tuple][Multiplication]")
|
||||
TEST_CASE("[01][Tuple] Dividing a tuple by a scalar", "[Tuple][Multiplication]")
|
||||
{
|
||||
Tuple a(1, -2, 3, -4);
|
||||
|
||||
@@ -246,7 +246,7 @@ TEST_CASE("[Tuple] Dividing a tuple by a scalar", "[Tuple][Multiplication]")
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
TEST_CASE("[Tuple] Dividing a tuple by a scalar without modify a", "[Tuple][Multiplication]")
|
||||
TEST_CASE("[01][Tuple] Dividing a tuple by a scalar without modify a", "[Tuple][Multiplication]")
|
||||
{
|
||||
Tuple a(1, -2, 3, -4);
|
||||
|
||||
@@ -257,7 +257,7 @@ TEST_CASE("[Tuple] Dividing a tuple by a scalar without modify a", "[Tuple][Mult
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
TEST_CASE("[Tuple] Computing the magnitude of vector(1,0,0)", "[Tuple][Magnitude]")
|
||||
TEST_CASE("[01][Tuple] Computing the magnitude of vector(1,0,0)", "[Tuple][Magnitude]")
|
||||
{
|
||||
Tuple v = Tuple::Vector(1, 0, 0);
|
||||
|
||||
@@ -266,7 +266,7 @@ TEST_CASE("[Tuple] Computing the magnitude of vector(1,0,0)", "[Tuple][Magnitude
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
TEST_CASE("[Tuple] Computing the magnitude of vector(0,1,0)", "[Tuple][Magnitude]")
|
||||
TEST_CASE("[01][Tuple] Computing the magnitude of vector(0,1,0)", "[Tuple][Magnitude]")
|
||||
{
|
||||
Tuple v = Tuple::Vector(0, 1, 0);
|
||||
|
||||
@@ -275,7 +275,7 @@ TEST_CASE("[Tuple] Computing the magnitude of vector(0,1,0)", "[Tuple][Magnitude
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
TEST_CASE("[Tuple] Computing the magnitude of vector(0,0,1)", "[Tuple][Magnitude]")
|
||||
TEST_CASE("[01][Tuple] Computing the magnitude of vector(0,0,1)", "[Tuple][Magnitude]")
|
||||
{
|
||||
Tuple v = Tuple::Vector(0, 0, 1);
|
||||
|
||||
@@ -284,7 +284,7 @@ TEST_CASE("[Tuple] Computing the magnitude of vector(0,0,1)", "[Tuple][Magnitude
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
TEST_CASE("[Tuple] Computing the magnitude of vector(1,2,3)", "[Tuple][Magnitude]")
|
||||
TEST_CASE("[01][Tuple] Computing the magnitude of vector(1,2,3)", "[Tuple][Magnitude]")
|
||||
{
|
||||
Tuple v = Tuple::Vector(1, 2, 3);
|
||||
|
||||
@@ -293,7 +293,7 @@ TEST_CASE("[Tuple] Computing the magnitude of vector(1,2,3)", "[Tuple][Magnitude
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
TEST_CASE("[Tuple] Computing the magnitude of vector(-1,-2,-3)", "[Tuple][Magnitude]")
|
||||
TEST_CASE("[01][Tuple] Computing the magnitude of vector(-1,-2,-3)", "[Tuple][Magnitude]")
|
||||
{
|
||||
Tuple v = Tuple::Vector(-1, -2, -3);
|
||||
|
||||
@@ -302,7 +302,7 @@ TEST_CASE("[Tuple] Computing the magnitude of vector(-1,-2,-3)", "[Tuple][Magnit
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
TEST_CASE("[Tuple] Normalize vector(4,0,0) gives (1,0,0)", "[Tuple][Normalize]")
|
||||
TEST_CASE("[01][Tuple] Normalize vector(4,0,0) gives (1,0,0)", "[Tuple][Normalize]")
|
||||
{
|
||||
Tuple v = Tuple::Vector(4, 0, 0);
|
||||
|
||||
@@ -311,7 +311,7 @@ TEST_CASE("[Tuple] Normalize vector(4,0,0) gives (1,0,0)", "[Tuple][Normalize]")
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
TEST_CASE("[Tuple] Normalize vector(1,2,3)", "[Tuple][Normalize]")
|
||||
TEST_CASE("[01][Tuple] Normalize vector(1,2,3)", "[Tuple][Normalize]")
|
||||
{
|
||||
Tuple v = Tuple::Vector(1, 2, 3);
|
||||
|
||||
@@ -320,7 +320,7 @@ TEST_CASE("[Tuple] Normalize vector(1,2,3)", "[Tuple][Normalize]")
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
TEST_CASE("[Tuple] The magnitude of a normalized vector", "[Tuple][Normalize]")
|
||||
TEST_CASE("[01][Tuple] The magnitude of a normalized vector", "[Tuple][Normalize]")
|
||||
{
|
||||
Tuple norm;
|
||||
Tuple v = Tuple::Vector(1, 2, 3);
|
||||
@@ -332,7 +332,7 @@ TEST_CASE("[Tuple] The magnitude of a normalized vector", "[Tuple][Normalize]")
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
TEST_CASE("[Tuple] The dot product of two tuples", "[Tuple][Dot]")
|
||||
TEST_CASE("[01][Tuple] The dot product of two tuples", "[Tuple][Dot]")
|
||||
{
|
||||
Tuple a = Tuple::Vector(1, 2, 3);
|
||||
Tuple b = Tuple::Vector(2, 3, 4);
|
||||
@@ -342,7 +342,7 @@ TEST_CASE("[Tuple] The dot product of two tuples", "[Tuple][Dot]")
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
TEST_CASE("[Tuple] The cross product of two vector", "[Tuple][Cross]")
|
||||
TEST_CASE("[01][Tuple] The cross product of two vector", "[Tuple][Cross]")
|
||||
{
|
||||
Tuple a = Tuple::Vector(1, 2, 3);
|
||||
Tuple b = Tuple::Vector(2, 3, 4);
|
||||
|
||||
@@ -33,7 +33,7 @@ using namespace Raytracer;
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
TEST_CASE("[Color] colors are (red,green,blue) tuples", "[Colors]")
|
||||
TEST_CASE("[02][01][Color] colors are (red,green,blue) tuples", "[Colors]")
|
||||
{
|
||||
Color c(-0.5, 0.4, 1.7);
|
||||
|
||||
@@ -44,7 +44,7 @@ TEST_CASE("[Color] colors are (red,green,blue) tuples", "[Colors]")
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
TEST_CASE("[Color] Colors could be copied", "[Colors]")
|
||||
TEST_CASE("[02][01][Color] Colors could be copied", "[Colors]")
|
||||
{
|
||||
Color c1(-0.5, 0.4, 1.7);
|
||||
Color c2;
|
||||
@@ -58,7 +58,7 @@ TEST_CASE("[Color] Colors could be copied", "[Colors]")
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
TEST_CASE("[Color] Adding colors", "[Colors]")
|
||||
TEST_CASE("[02][01][Color] Adding colors", "[Colors]")
|
||||
{
|
||||
Color c1(0.9, 0.6, 0.75);
|
||||
Color c2(0.7, 0.1, 0.25);
|
||||
@@ -68,7 +68,7 @@ TEST_CASE("[Color] Adding colors", "[Colors]")
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
TEST_CASE("[Color] Adding colors without modify c1", "[Colors]")
|
||||
TEST_CASE("[02][01][Color] Adding colors without modify c1", "[Colors]")
|
||||
{
|
||||
Color c1(0.9, 0.6, 0.75);
|
||||
Color c2(0.7, 0.1, 0.25);
|
||||
@@ -80,7 +80,7 @@ TEST_CASE("[Color] Adding colors without modify c1", "[Colors]")
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
TEST_CASE("[Color] Subtracting colors", "[Colors]")
|
||||
TEST_CASE("[02][01][Color] Subtracting colors", "[Colors]")
|
||||
{
|
||||
Color c1(0.9, 0.6, 0.75);
|
||||
Color c2(0.7, 0.1, 0.25);
|
||||
@@ -90,7 +90,7 @@ TEST_CASE("[Color] Subtracting colors", "[Colors]")
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
TEST_CASE("[Color] Subtracting colors without modify c1", "[Colors]")
|
||||
TEST_CASE("[02][01][Color] Subtracting colors without modify c1", "[Colors]")
|
||||
{
|
||||
Color c1(0.9, 0.6, 0.75);
|
||||
Color c2(0.7, 0.1, 0.25);
|
||||
@@ -102,7 +102,7 @@ TEST_CASE("[Color] Subtracting colors without modify c1", "[Colors]")
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
TEST_CASE("[Color] Multiplying a color by a scalar", "[Colors]")
|
||||
TEST_CASE("[02][01][Color] Multiplying a color by a scalar", "[Colors]")
|
||||
{
|
||||
Color c(0.2, 0.3, 0.4);
|
||||
|
||||
@@ -111,7 +111,7 @@ TEST_CASE("[Color] Multiplying a color by a scalar", "[Colors]")
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
TEST_CASE("[Color] Multiplying a color by a scalar without modify c", "[Colors]")
|
||||
TEST_CASE("[02][01][Color] Multiplying a color by a scalar without modify c", "[Colors]")
|
||||
{
|
||||
Color c(0.2, 0.3, 0.4);
|
||||
|
||||
@@ -122,7 +122,7 @@ TEST_CASE("[Color] Multiplying a color by a scalar without modify c", "[Colors]"
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
TEST_CASE("[Color] Multiplying a colors", "[Colors]")
|
||||
TEST_CASE("[02][01][Color] Multiplying a colors", "[Colors]")
|
||||
{
|
||||
Color c1(1, 0.2, 0.4);
|
||||
Color c2(0.9, 1, 0.1);
|
||||
|
||||
@@ -33,7 +33,7 @@ using namespace Raytracer;
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
TEST_CASE("[Canvas] Creating a canvas", "[Canvas]")
|
||||
TEST_CASE("[02][02][Canvas] Creating a canvas", "[Canvas]")
|
||||
{
|
||||
Canvas c(10, 20);
|
||||
|
||||
@@ -51,7 +51,7 @@ TEST_CASE("[Canvas] Creating a canvas", "[Canvas]")
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
TEST_CASE("[Canvas] Writing pixels to a canvas", "[Canvas]")
|
||||
TEST_CASE("[02][02][Canvas] Writing pixels to a canvas", "[Canvas]")
|
||||
{
|
||||
Canvas c(10, 20);
|
||||
Color red(1, 0, 0);
|
||||
@@ -63,7 +63,7 @@ TEST_CASE("[Canvas] Writing pixels to a canvas", "[Canvas]")
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
TEST_CASE("[Canvas] Constructing the PPM pixel data", "[Canvas]")
|
||||
TEST_CASE("[02][02][Canvas] Constructing the PPM pixel data", "[Canvas]")
|
||||
{
|
||||
std::string ppm, the_ref_ppm;
|
||||
Canvas c(5, 3);
|
||||
@@ -87,7 +87,7 @@ TEST_CASE("[Canvas] Constructing the PPM pixel data", "[Canvas]")
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
TEST_CASE("[Canvas] Split long lines in PPM files", "[Canvas]")
|
||||
TEST_CASE("[02][02][Canvas] Split long lines in PPM files", "[Canvas]")
|
||||
{
|
||||
std::string ppm, the_ref_ppm;
|
||||
Canvas c(10, 2);
|
||||
|
||||
@@ -33,7 +33,7 @@ using namespace Raytracer;
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
TEST_CASE("[Matrix] Constructing and inspecting a 4x4 matrix", "[Matrix]")
|
||||
TEST_CASE("[03][Matrix] Constructing and inspecting a 4x4 matrix", "[Matrix]")
|
||||
{
|
||||
Matrix m = {
|
||||
{ 1, 2, 3, 4},
|
||||
@@ -56,7 +56,7 @@ TEST_CASE("[Matrix] Constructing and inspecting a 4x4 matrix", "[Matrix]")
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
TEST_CASE("[Matrix] A 2x2 matrix ought to be representable", "[Matrix]")
|
||||
TEST_CASE("[03][Matrix] A 2x2 matrix ought to be representable", "[Matrix]")
|
||||
{
|
||||
Matrix m = {
|
||||
{-3, 5},
|
||||
@@ -74,7 +74,7 @@ TEST_CASE("[Matrix] A 2x2 matrix ought to be representable", "[Matrix]")
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
TEST_CASE("[Matrix] A 3x3 matrix ought to be representable", "[Matrix]")
|
||||
TEST_CASE("[03][Matrix] A 3x3 matrix ought to be representable", "[Matrix]")
|
||||
{
|
||||
Matrix m = {
|
||||
{-3, 5, 0},
|
||||
@@ -92,7 +92,7 @@ TEST_CASE("[Matrix] A 3x3 matrix ought to be representable", "[Matrix]")
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
TEST_CASE("[Matrix] Matrix equality with identical matrices", "[Matrix]")
|
||||
TEST_CASE("[03][Matrix] Matrix equality with identical matrices", "[Matrix]")
|
||||
{
|
||||
Matrix a = {
|
||||
{1, 2, 3, 4},
|
||||
@@ -112,7 +112,7 @@ TEST_CASE("[Matrix] Matrix equality with identical matrices", "[Matrix]")
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
TEST_CASE("[Matrix] Matrix equality with different matrices", "[Matrix]")
|
||||
TEST_CASE("[03][Matrix] Matrix equality with different matrices", "[Matrix]")
|
||||
{
|
||||
Matrix a = {
|
||||
{1, 2, 3, 4},
|
||||
@@ -132,7 +132,7 @@ TEST_CASE("[Matrix] Matrix equality with different matrices", "[Matrix]")
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
TEST_CASE("[Matrix] Multiplying two matrices", "[Matrix]")
|
||||
TEST_CASE("[03][Matrix] Multiplying two matrices", "[Matrix]")
|
||||
{
|
||||
Matrix a = {
|
||||
{1, 2, 3, 4},
|
||||
@@ -158,7 +158,7 @@ TEST_CASE("[Matrix] Multiplying two matrices", "[Matrix]")
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
TEST_CASE("[Matrix] a matrix multiplied by a tuple", "[Matrix]")
|
||||
TEST_CASE("[03][Matrix] a matrix multiplied by a tuple", "[Matrix]")
|
||||
{
|
||||
Matrix a = {
|
||||
{1, 2, 3, 4},
|
||||
@@ -173,7 +173,7 @@ TEST_CASE("[Matrix] a matrix multiplied by a tuple", "[Matrix]")
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
TEST_CASE("[Matrix] Multiplying a matrix by the identity matrix", "[Matrix]")
|
||||
TEST_CASE("[03][Matrix] Multiplying a matrix by the identity matrix", "[Matrix]")
|
||||
{
|
||||
Matrix a = {
|
||||
{0, 1, 2, 4},
|
||||
@@ -187,7 +187,7 @@ TEST_CASE("[Matrix] Multiplying a matrix by the identity matrix", "[Matrix]")
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
TEST_CASE("[Matrix] Multiplying the identity matrix by a tuple", "[Matrix]")
|
||||
TEST_CASE("[03][Matrix] Multiplying the identity matrix by a tuple", "[Matrix]")
|
||||
{
|
||||
Tuple a(1, 2, 3, 4);
|
||||
|
||||
@@ -196,7 +196,7 @@ TEST_CASE("[Matrix] Multiplying the identity matrix by a tuple", "[Matrix]")
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
TEST_CASE("[Matrix] Transposing a matrix", "[Matrix]")
|
||||
TEST_CASE("[03][Matrix] Transposing a matrix", "[Matrix]")
|
||||
{
|
||||
Matrix a = {
|
||||
{0, 9, 3, 0},
|
||||
@@ -218,7 +218,7 @@ TEST_CASE("[Matrix] Transposing a matrix", "[Matrix]")
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
TEST_CASE("[Matrix] Transposing the identity matrix", "[Matrix]")
|
||||
TEST_CASE("[03][Matrix] Transposing the identity matrix", "[Matrix]")
|
||||
{
|
||||
Matrix a = Matrix::identity();
|
||||
|
||||
@@ -229,7 +229,7 @@ TEST_CASE("[Matrix] Transposing the identity matrix", "[Matrix]")
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
TEST_CASE("[Matrix] Calculating the determinant of a 2x2 matrix", "[Matrix]")
|
||||
TEST_CASE("[03][Matrix] Calculating the determinant of a 2x2 matrix", "[Matrix]")
|
||||
{
|
||||
Matrix a = {
|
||||
{ 1, 5},
|
||||
@@ -241,7 +241,7 @@ TEST_CASE("[Matrix] Calculating the determinant of a 2x2 matrix", "[Matrix]")
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
TEST_CASE("[Matrix] A submatrix of a 3x3 matrix is a 2x2 matrix", "[Matrix]")
|
||||
TEST_CASE("[03][Matrix] A submatrix of a 3x3 matrix is a 2x2 matrix", "[Matrix]")
|
||||
{
|
||||
Matrix a = {
|
||||
{ 1, 5, 0},
|
||||
@@ -259,7 +259,7 @@ TEST_CASE("[Matrix] A submatrix of a 3x3 matrix is a 2x2 matrix", "[Matrix]")
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
TEST_CASE("[Matrix] A submatrix of a 4x4 matrix is a 3x3 matrix", "[Matrix]")
|
||||
TEST_CASE("[03][Matrix] A submatrix of a 4x4 matrix is a 3x3 matrix", "[Matrix]")
|
||||
{
|
||||
Matrix a = {
|
||||
{-6, 1, 1, 6},
|
||||
@@ -279,7 +279,7 @@ TEST_CASE("[Matrix] A submatrix of a 4x4 matrix is a 3x3 matrix", "[Matrix]")
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
TEST_CASE("[Matrix] Calculating a minor of a 3x3 matrix", "[Matrix]")
|
||||
TEST_CASE("[03][Matrix] Calculating a minor of a 3x3 matrix", "[Matrix]")
|
||||
{
|
||||
Matrix a = {
|
||||
{3, 5, 0},
|
||||
@@ -296,7 +296,7 @@ TEST_CASE("[Matrix] Calculating a minor of a 3x3 matrix", "[Matrix]")
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
TEST_CASE("[Matrix] Calculating a cofactor of a 3x3 matrix", "[Matrix]")
|
||||
TEST_CASE("[03][Matrix] Calculating a cofactor of a 3x3 matrix", "[Matrix]")
|
||||
{
|
||||
Matrix a = {
|
||||
{3, 5, 0},
|
||||
@@ -312,7 +312,7 @@ TEST_CASE("[Matrix] Calculating a cofactor of a 3x3 matrix", "[Matrix]")
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
TEST_CASE("[Matrix] Calculating the determinant of a 3x3 matrix", "[Matrix]")
|
||||
TEST_CASE("[03][Matrix] Calculating the determinant of a 3x3 matrix", "[Matrix]")
|
||||
{
|
||||
Matrix a = {
|
||||
{ 1, 2, 6},
|
||||
@@ -328,7 +328,7 @@ TEST_CASE("[Matrix] Calculating the determinant of a 3x3 matrix", "[Matrix]")
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
TEST_CASE("[Matrix] Calculating the determinant of a 4x4 matrix", "[Matrix]")
|
||||
TEST_CASE("[03][Matrix] Calculating the determinant of a 4x4 matrix", "[Matrix]")
|
||||
{
|
||||
Matrix a = {
|
||||
{-2, -8, 3, 5},
|
||||
@@ -346,7 +346,7 @@ TEST_CASE("[Matrix] Calculating the determinant of a 4x4 matrix", "[Matrix]")
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
TEST_CASE("[Matrix] Testing an invertible matrix for invertibility", "[Matrix]")
|
||||
TEST_CASE("[03][Matrix] Testing an invertible matrix for invertibility", "[Matrix]")
|
||||
{
|
||||
Matrix a = {
|
||||
{6, 4, 4, 4},
|
||||
@@ -361,7 +361,7 @@ TEST_CASE("[Matrix] Testing an invertible matrix for invertibility", "[Matrix]")
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
TEST_CASE("[Matrix] Testing an noninvertible matrix for invertibility", "[Matrix]")
|
||||
TEST_CASE("[03][Matrix] Testing an noninvertible matrix for invertibility", "[Matrix]")
|
||||
{
|
||||
Matrix a = {
|
||||
{-4, 2, -2, -3},
|
||||
@@ -376,7 +376,7 @@ TEST_CASE("[Matrix] Testing an noninvertible matrix for invertibility", "[Matrix
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
TEST_CASE("[Matrix] Calculating the inverse of a matrix", "[Matrix]")
|
||||
TEST_CASE("[03][Matrix] Calculating the inverse of a matrix", "[Matrix]")
|
||||
{
|
||||
Matrix a = {
|
||||
{-5, 2, 6, -8},
|
||||
@@ -404,7 +404,7 @@ TEST_CASE("[Matrix] Calculating the inverse of a matrix", "[Matrix]")
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
TEST_CASE("[Matrix] Calculating the inverse of another matrix", "[Matrix]")
|
||||
TEST_CASE("[03][Matrix] Calculating the inverse of another matrix", "[Matrix]")
|
||||
{
|
||||
Matrix a = {
|
||||
{ 8, -5, 9, 2},
|
||||
@@ -424,7 +424,7 @@ TEST_CASE("[Matrix] Calculating the inverse of another matrix", "[Matrix]")
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
TEST_CASE("[Matrix] Calculating the inverse of third matrix", "[Matrix]")
|
||||
TEST_CASE("[03][Matrix] Calculating the inverse of third matrix", "[Matrix]")
|
||||
{
|
||||
Matrix a = {
|
||||
{ 9, 3, 0, 9},
|
||||
@@ -444,7 +444,7 @@ TEST_CASE("[Matrix] Calculating the inverse of third matrix", "[Matrix]")
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
TEST_CASE("[Matrix] Multiplying a product by its inverse", "[Matrix]")
|
||||
TEST_CASE("[03][Matrix] Multiplying a product by its inverse", "[Matrix]")
|
||||
{
|
||||
Matrix a = {
|
||||
{ 3, -9, 7, 3},
|
||||
|
||||
Reference in New Issue
Block a user