commit e4645dff74c0e0e545062497a700cd60570a7237
parent b4122160793a949af272d2f2070d4b44c8f3b24e
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Tue, 28 Mar 2017 16:09:15 +0200
Test the parsing of the normal map of the matte material
Diffstat:
2 files changed, 33 insertions(+), 1 deletion(-)
diff --git a/src/parser/yaml/test_ko_0.yaml b/src/parser/yaml/test_ko_0.yaml
@@ -201,6 +201,7 @@
# <matte> ::=
# matte:
# reflectivity: REAL # in [0, 1]
+# [ normal_map: { path: PATH } ]
#
# missing matte parameters
@@ -221,7 +222,25 @@
# 2x reflectivity
- material: { matte: { reflectivity: 1, reflectivity: 1 } }
---
-
+# bad normal map
+- material:
+ matte: { reflectivity: 1, normal_map: map }
+---
+# bad normal map
+- material:
+ matte: { reflectivity: 1, normal_map: { path: } }
+---
+# Missing reflectivity
+- material:
+ matte: { normal_map: { path: test } }
+---
+# 2x normal map
+- material:
+ matte:
+ reflectivity: 1
+ normal_map: { path: test }
+ normal_map: { path: test2}
+#
#
# <thin-dielectric> ::=
# thin_dielectric:
diff --git a/src/parser/yaml/test_ok_2.yaml b/src/parser/yaml/test_ok_2.yaml
@@ -39,3 +39,16 @@
geometry:
- material: { matte: { reflectivity: 1 } }
stl: { path: "path/path/path" }
+---
+- sun: { dni: 1, spectrum: [{wavelength: 1, data: 1}] }
+- material: &lambertian
+ matte:
+ reflectivity: 0.123
+ normal_map: { path: "path/to my normal map" }
+- entity:
+ name: hop
+ primary: 1
+ geometry:
+ - material: *lambertian
+ stl: { path: "path/path/path" }
+