Add: Testing amount constant = 100

Remove: Old commented tests
This commit is contained in:
Nikola
2026-07-15 16:21:25 +02:00
parent 838d1fac0c
commit 1833051ff1
2 changed files with 18 additions and 39 deletions
+17 -38
View File
@@ -16,6 +16,8 @@
#include "tricorn_V3.h"
const uint16_t TESTING_AMOUNT = 100;
void save_bmp(const char *filename, unsigned char *img, size_t width, ssize_t height,_Bool color);
@@ -80,68 +82,45 @@ unsigned tests(void) {
return EXIT_FAILURE;
}
// printf("\nTest 1: Default image, not coloured\n");
// printf("\n\n");
// benchmarking(10,0,-2.0f - 0.5f*I, width, height, 0.001f, 200, false, tempArrNotColored);
// printf("\n\n");
// benchmarking(10,1,-2.0f - 0.5f*I, width, height, 0.001f, 200, false, tempArrNotColored);
// printf("\n\n");
// benchmarking(10,2,-2.0f - 0.5f*I, width, height, 0.001f, 200, false, tempArrNotColored);
// printf("\n\n");
// benchmarking(10,3,-2.0f - 0.5f*I, width, height, 0.001f, 200, false, tempArrNotColored);
printf("\n\n\nTest 1: Default image, coloured\n");
printf("\n\n");
benchmarking(10,0,-2.0f - 0.5f*I, width, height, 0.001f, 200, true, tempArrColored);
benchmarking(TESTING_AMOUNT,0,-2.0f - 0.5f*I, width, height, 0.001f, 200, true, tempArrColored);
printf("\n\n");
benchmarking(10,1,-2.0f - 0.5f*I, width, height, 0.001f, 200, true, tempArrColored);
benchmarking(TESTING_AMOUNT,1,-2.0f - 0.5f*I, width, height, 0.001f, 200, true, tempArrColored);
printf("\n\n");
benchmarking(10,2,-2.0f - 0.5f*I, width, height, 0.001f, 200, true, tempArrColored);
benchmarking(TESTING_AMOUNT,2,-2.0f - 0.5f*I, width, height, 0.001f, 200, true, tempArrColored);
printf("\n\n");
benchmarking(10,3,-2.0f - 0.5f*I, width, height, 0.001f, 200, true, tempArrColored);
printf("\n\n\nTest 2: Ultra high resolution low iterations\n");
printf("\n\n");
benchmarking(10,0,-2.0f - 0.5f*I, ultra_width, ultra_height, 0.001f, 5, true, tempArrUltraColored);
benchmarking(TESTING_AMOUNT,0,-2.0f - 0.5f*I, ultra_width, ultra_height, 0.001f, 5, true, tempArrUltraColored);
printf("\n\n");
benchmarking(10,1,-2.0f - 0.5f*I, ultra_width, ultra_height, 0.001f, 5, true, tempArrUltraColored);
benchmarking(TESTING_AMOUNT,1,-2.0f - 0.5f*I, ultra_width, ultra_height, 0.001f, 5, true, tempArrUltraColored);
printf("\n\n");
benchmarking(10,2,-2.0f - 0.5f*I, ultra_width, ultra_height, 0.001f, 5, true, tempArrUltraColored);
benchmarking(TESTING_AMOUNT,2,-2.0f - 0.5f*I, ultra_width, ultra_height, 0.001f, 5, true, tempArrUltraColored);
printf("\n\n");
benchmarking(10,3,-2.0f - 0.5f*I, ultra_width, ultra_height, 0.001f, 5, true, tempArrUltraColored);
// printf("\n\n\nTest 4: High iteration count\n");
// printf("\n\n");
// benchmarking(10,0,-2.0f - 0.5f*I, width, height, 0.001f, 5000, false, tempArrNotColored);
// printf("\n\n");
// benchmarking(10,1,-2.0f - 0.5f*I, width, height, 0.001f, 5000, false, tempArrNotColored);
// printf("\n\n");
// benchmarking(10,2,-2.0f - 0.5f*I, width, height, 0.001f, 5000, false, tempArrNotColored);
// printf("\n\n");
// benchmarking(10,3,-2.0f - 0.5f*I, width, height, 0.001f, 5000, false, tempArrNotColored);
benchmarking(TESTING_AMOUNT,3,-2.0f - 0.5f*I, ultra_width, ultra_height, 0.001f, 5, true, tempArrUltraColored);
printf("\n\n\nTest 3: Zoomed on fractal edge\n");
printf("\n\n");
benchmarking(10,0,-1.431f - 0.250f*I, 1024, 1024, 0.0005f, 3000, false, tempArrNotColored);
benchmarking(TESTING_AMOUNT,0,-1.431f - 0.250f*I, 1024, 1024, 0.0005f, 3000, false, tempArrNotColored);
printf("\n\n");
benchmarking(10,1,-1.1f - 0.0f*I, 1024, 1024, 0.0005f, 3000, false, tempArrNotColored);
benchmarking(TESTING_AMOUNT,1,-1.1f - 0.0f*I, 1024, 1024, 0.0005f, 3000, false, tempArrNotColored);
printf("\n\n");
benchmarking(10,2,-1.1f - 0.0f*I, 1024, 512, 0.0005f, 3000, false, tempArrNotColored);
benchmarking(TESTING_AMOUNT,2,-1.1f - 0.0f*I, 1024, 512, 0.0005f, 3000, false, tempArrNotColored);
printf("\n\n");
benchmarking(10,3,-1.1f - 0.0f*I, 1024, 512, 0.0005f, 3000, false, tempArrNotColored);
benchmarking(TESTING_AMOUNT,3,-1.1f - 0.0f*I, 1024, 512, 0.0005f, 3000, false, tempArrNotColored);
printf("\nTest 4: Pure Black\n");
printf("\n\n");
benchmarking(10,0,0, width, height, 0.00001f, 1000, false, tempArrNotColored);
benchmarking(TESTING_AMOUNT,0,0, width, height, 0.00001f, 1000, false, tempArrNotColored);
printf("\n\n");
benchmarking(10,1,0, width, height, 0.00001f, 1000, false, tempArrNotColored);
benchmarking(TESTING_AMOUNT,1,0, width, height, 0.00001f, 1000, false, tempArrNotColored);
printf("\n\n");
benchmarking(10,2,0, width, height, 0.00001f, 1000, false, tempArrNotColored);
benchmarking(TESTING_AMOUNT,2,0, width, height, 0.00001f, 1000, false, tempArrNotColored);
printf("\n\n");
benchmarking(10,3,0, width, height, 0.00001f, 1000, false, tempArrNotColored);
benchmarking(TESTING_AMOUNT,3,0, width, height, 0.00001f, 1000, false, tempArrNotColored);