Browse Source

Add a test for hw3render

Godzil 4 years ago
parent
commit
56095169eb
2 changed files with 11 additions and 1 deletions
  1. 2 1
      tests/CMakeLists.txt
  2. 9 0
      tests/test.hw3scene

+ 2 - 1
tests/CMakeLists.txt

@@ -77,4 +77,5 @@ add_test(NAME Chapter10_Test COMMAND $<TARGET_FILE:ch10_test>)
 add_test(NAME Chapter11_Reflection COMMAND $<TARGET_FILE:ch11_reflection>)
 add_test(NAME Chapter11_Refraction COMMAND $<TARGET_FILE:ch11_refraction>)
 add_test(NAME Chapter11_Test COMMAND $<TARGET_FILE:ch11_test>)
-add_test(NAME Chapter12_Test COMMAND $<TARGET_FILE:ch12_test>)
+add_test(NAME Chapter12_Test COMMAND $<TARGET_FILE:ch12_test>)
+add_test(NAME Hw3Render COMMAND $<TARGET_FILE:hw3render> ${CMAKE_CURRENT_SOURCE_DIR}/test.hw3scene)

+ 9 - 0
tests/test.hw3scene

@@ -0,0 +1,9 @@
+# A ball lit by 3 lights
+camera 0 0 -1 0 0 0 0 1 0 45
+
+point 0 4 0 .7 .2 .2
+#point 4 0 4 .5 .5 .5
+point 4 -4 0 .2 .7 .2
+point -4 -4 0 .2 .2 .7
+
+sphere 0 0 0 .3