Skip to content

Commit

Permalink
Remove test
Browse files Browse the repository at this point in the history
  • Loading branch information
Miou-zora committed May 9, 2024
1 parent 145642f commit db4e6f1
Showing 1 changed file with 0 additions and 61 deletions.
61 changes: 0 additions & 61 deletions src/Plane.zig
Original file line number Diff line number Diff line change
Expand Up @@ -44,67 +44,6 @@ pub const Plane = struct {
}
};

// TODO: fix these tests
// test "hit" {
// const plane = Plane{
// .normal = Vec3{ .x = 0.0, .y = 1.0, .z = 0.0 },
// .origin = Pt3{ .x = 0.0, .y = 0.0, .z = 0.0 },
// .material = Material.nil(),
// .transform = null,
// };

// const ray = Ray{
// .origin = Pt3{ .x = 0.0, .y = 1.0, .z = 0.0 },
// .direction = Vec3{ .x = 0.0, .y = -1.0, .z = 0.0 },
// };

// const hit_record = plane.hits(ray);

// try std.testing.expect(hit_record.hit);
// try std.testing.expect(hit_record.intersection_point.x == 0.0);
// try std.testing.expect(hit_record.intersection_point.y == 0.0);
// try std.testing.expect(hit_record.intersection_point.z == 0.0);
// try std.testing.expect(hit_record.normal.x == 0.0);
// try std.testing.expect(hit_record.normal.y == 1.0);
// try std.testing.expect(hit_record.normal.z == 0.0);
// }

// test "dontHit" {
// const plane = Plane{
// .normal = Vec3{ .x = 0.0, .y = 1.0, .z = 0.0 },
// .origin = Pt3{ .x = 0.0, .y = 0.0, .z = 0.0 },
// .material = Material.nil(),
// .transform = null,
// };

// const ray = Ray{
// .origin = Pt3{ .x = 0.0, .y = 1.0, .z = 0.0 },
// .direction = Vec3{ .x = 0.0, .y = 1.0, .z = 0.0 },
// };

// const hit_record = plane.hits(ray);

// try std.testing.expect(!hit_record.hit);
// }

// test "parallel" {
// const plane = Plane{
// .normal = Vec3{ .x = 0.0, .y = 1.0, .z = 0.0 },
// .origin = Pt3{ .x = 0.0, .y = 0.0, .z = 0.0 },
// .material = Material.nil(),
// .transform = null,
// };

// const ray = Ray{
// .origin = Pt3{ .x = 0.0, .y = 1.0, .z = 0.0 },
// .direction = Vec3{ .x = 0.0, .y = 1.0, .z = 0.0 },
// };

// const hit_record = plane.hits(ray);

// try std.testing.expect(!hit_record.hit);
// }

test {
std.testing.refAllDecls(@This());
}

0 comments on commit db4e6f1

Please sign in to comment.