diff --git a/wavefront/src/mtl.rs b/wavefront/src/mtl.rs index 03e8185c..fb04d4da 100644 --- a/wavefront/src/mtl.rs +++ b/wavefront/src/mtl.rs @@ -208,6 +208,10 @@ mod tests { mtl_test("newmtl m1\nKd 1. 2. 3.").materials[0].diffuse_reflection, [1., 2., 3.] ); + assert_eq!( + mtl_test("newmtl m1\nmap_Kd file.png").materials[0].diffuse_map, + "file.png" + ); assert_eq!( mtl_test("newmtl m1\nKs 1. 2. 3.").materials[0].specular_reflection, [1., 2., 3.] @@ -224,15 +228,12 @@ mod tests { mtl_test("newmtl m1\nNi 0.5").materials[0].index_of_refraction, 0.5 ); + assert_eq!(mtl_test("newmtl m1\nd 0.8").materials[0].transparency, 0.2); assert_eq!(mtl_test("newmtl m1\nTr 0.5").materials[0].transparency, 0.5); assert_eq!( mtl_test("newmtl m1\nspecularroughness 1.").materials.len(), 1 ); - assert_eq!( - mtl_test("newmtl m1\nmap_Kd file.png").materials[0].diffuse_map, - "file.png" - ); } #[test]