Showing the changes to interface/src/Util.cpp (1 of 13 files). Show all
Unified · Split
| @@ -13,6 +13,7 @@ · 12 unmodified lines | ||
| 13 | 13 | #include <glm/glm.hpp> |
| 14 | 14 | #include <SharedUtil.h> |
| 15 | 15 | |
| 16 | +#include "Log.h" | |
| 16 | 17 | #include "world.h" |
| 17 | 18 | #include "Util.h" |
| 18 | 19 | |
| @@ -258,7 +259,7 @@ void renderOrientationDirections( glm::vec3 position, Orientation orientation, f · 239 unmodified lines | ||
| 258 | 259 | } |
| 259 | 260 | |
| 260 | 261 | void testOrientationClass() { |
| 261 | − printf("\n----------\ntestOrientationClass()\n----------\n\n"); | |
| 262 | + printLog("\n----------\ntestOrientationClass()\n----------\n\n"); | |
| 262 | 263 | |
| 263 | 264 | oTestCase tests[] = { |
| 264 | 265 | // - inputs ------------, outputs -------------------- ------------------- ---------------------------- |
| @@ -297,43 +298,43 @@ void testOrientationClass() { · 32 unmodified lines | ||
| 297 | 298 | glm::vec3 up = o1.getUp(); |
| 298 | 299 | glm::vec3 right = o1.getRight(); |
| 299 | 300 | |
| 300 | − printf("\n-----\nTest: %d - yaw=%f , pitch=%f , roll=%f \n\n",i+1,yaw,pitch,roll); | |
| 301 | + printLog("\n-----\nTest: %d - yaw=%f , pitch=%f , roll=%f \n\n",i+1,yaw,pitch,roll); | |
| 301 | 302 | |
| 302 | − printf(" +front.x=%f, front.y=%f, front.z=%f\n",front.x,front.y,front.z); | |
| 303 | + printLog(" +front.x=%f, front.y=%f, front.z=%f\n",front.x,front.y,front.z); | |
| 303 | 304 | if (front.x == tests[i].frontX && front.y == tests[i].frontY && front.z == tests[i].frontZ) { |
| 304 | − printf(" front vector PASSES!\n"); | |
| 305 | + printLog(" front vector PASSES!\n"); | |
| 305 | 306 | } else { |
| 306 | − printf(" front vector FAILED! expected: \n"); | |
| 307 | − printf(" front.x=%f, front.y=%f, front.z=%f\n",tests[i].frontX,tests[i].frontY,tests[i].frontZ); | |
| 307 | + printLog(" front vector FAILED! expected: \n"); | |
| 308 | + printLog(" front.x=%f, front.y=%f, front.z=%f\n",tests[i].frontX,tests[i].frontY,tests[i].frontZ); | |
| 308 | 309 | passed = false; |
| 309 | 310 | } |
| 310 | 311 | |
| 311 | − printf(" +up.x=%f, up.y=%f, up.z=%f\n",up.x,up.y,up.z); | |
| 312 | + printLog(" +up.x=%f, up.y=%f, up.z=%f\n",up.x,up.y,up.z); | |
| 312 | 313 | if (up.x == tests[i].upX && up.y == tests[i].upY && up.z == tests[i].upZ) { |
| 313 | − printf(" up vector PASSES!\n"); | |
| 314 | + printLog(" up vector PASSES!\n"); | |
| 314 | 315 | } else { |
| 315 | − printf(" up vector FAILED! expected: \n"); | |
| 316 | − printf(" up.x=%f, up.y=%f, up.z=%f\n",tests[i].upX,tests[i].upY,tests[i].upZ); | |
| 316 | + printLog(" up vector FAILED! expected: \n"); | |
| 317 | + printLog(" up.x=%f, up.y=%f, up.z=%f\n",tests[i].upX,tests[i].upY,tests[i].upZ); | |
| 317 | 318 | passed = false; |
| 318 | 319 | } |
| 319 | 320 | |
| 320 | 321 | |
| 321 | − printf(" +right.x=%f, right.y=%f, right.z=%f\n",right.x,right.y,right.z); | |
| 322 | + printLog(" +right.x=%f, right.y=%f, right.z=%f\n",right.x,right.y,right.z); | |
| 322 | 323 | if (right.x == tests[i].rightX && right.y == tests[i].rightY && right.z == tests[i].rightZ) { |
| 323 | − printf(" right vector PASSES!\n"); | |
| 324 | + printLog(" right vector PASSES!\n"); | |
| 324 | 325 | } else { |
| 325 | − printf(" right vector FAILED! expected: \n"); | |
| 326 | − printf(" right.x=%f, right.y=%f, right.z=%f\n",tests[i].rightX,tests[i].rightY,tests[i].rightZ); | |
| 326 | + printLog(" right vector FAILED! expected: \n"); | |
| 327 | + printLog(" right.x=%f, right.y=%f, right.z=%f\n",tests[i].rightX,tests[i].rightY,tests[i].rightZ); | |
| 327 | 328 | passed = false; |
| 328 | 329 | } |
| 329 | 330 | |
| 330 | 331 | if (!passed) { |
| 331 | − printf("\n-----\nTest: %d - FAILED! \n----------\n\n",i+1); | |
| 332 | + printLog("\n-----\nTest: %d - FAILED! \n----------\n\n",i+1); | |
| 332 | 333 | failedCount++; |
| 333 | 334 | } |
| 334 | 335 | } |
| 335 | − printf("\n-----\nTotal Failed: %d out of %d \n----------\n\n",failedCount,totalTests); | |
| 336 | − printf("\n----------DONE----------\n\n"); | |
| 336 | + printLog("\n-----\nTotal Failed: %d out of %d \n----------\n\n",failedCount,totalTests); | |
| 337 | + printLog("\n----------DONE----------\n\n"); | |
| 337 | 338 | } |
| 338 | 339 | |
| 339 | 340 | |