Renaming Object to Shape (part 1)
This commit is contained in:
@@ -32,7 +32,7 @@ TEST(IntersectTest, An_intersection_encapsulate_t_and_object)
|
||||
Intersection i = Intersection(3.5, &s);
|
||||
|
||||
ASSERT_EQ(i.t, 3.5);
|
||||
ASSERT_EQ(i.object, (Object *)&s);
|
||||
ASSERT_EQ(i.object, (Shape *)&s);
|
||||
}
|
||||
|
||||
TEST(IntersectTest, Aggregating_intersections)
|
||||
@@ -57,8 +57,8 @@ TEST(IntersectTest, Intersect_sets_the_object_on_the_intersection)
|
||||
Intersect xs = s.intersect(r);
|
||||
|
||||
ASSERT_EQ(xs.count(), 2);
|
||||
ASSERT_EQ(xs[0].object, (Object *)&s);
|
||||
ASSERT_EQ(xs[1].object, (Object *)&s);
|
||||
ASSERT_EQ(xs[0].object, (Shape *)&s);
|
||||
ASSERT_EQ(xs[1].object, (Shape *)&s);
|
||||
}
|
||||
|
||||
TEST(IntersectTest, The_hit_when_all_intersection_have_positive_t)
|
||||
|
||||
@@ -38,7 +38,7 @@ TEST(RayTest, Translating_a_ray)
|
||||
Ray r = Ray(Point(1, 2, 3), Vector(0, 1, 0));
|
||||
|
||||
Matrix m = translation(3, 4, 5);
|
||||
Object o = Object();
|
||||
Shape o = Shape();
|
||||
|
||||
o.setTransform(m);
|
||||
|
||||
@@ -53,7 +53,7 @@ TEST(RayTest, Scaling_a_ray)
|
||||
Ray r = Ray(Point(1, 2, 3), Vector(0, 1, 0));
|
||||
|
||||
Matrix m = scaling(2, 3, 4);
|
||||
Object o = Object();
|
||||
Shape o = Shape();
|
||||
|
||||
o.setTransform(m);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user